summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2015-01-04 00:23:53 -0600
committerJohn Wiegley <johnw@newartisans.com>2015-01-04 00:23:53 -0600
commit599af4642c24ab8db542aec19a25c367f3ed01f8 (patch)
treee585b0322667a4cdc5f9eedf602ad45dead434b7 /src/CMakeLists.txt
parentd6f194058fbf8c88b926c2cb7ed43aa4ff255bc0 (diff)
parentea397d205c84d01b8089e8fac0dd30e9100d1571 (diff)
downloadfork-ledger-599af4642c24ab8db542aec19a25c367f3ed01f8.tar.gz
fork-ledger-599af4642c24ab8db542aec19a25c367f3ed01f8.tar.bz2
fork-ledger-599af4642c24ab8db542aec19a25c367f3ed01f8.zip
Merge pull request #361 from lowdef/cygwin-build
automating ledger build on Cygwin
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index aec75c06..dcafeba2 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -167,7 +167,12 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
if (BUILD_LIBRARY)
list(APPEND _args ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
endif()
- list(APPEND _args "-std=c++11 ")
+ if (CYGWIN)
+ list(APPEND _args "-std=c++11 ")
+ list(APPEND _args "-U__STRICT_ANSI__")
+ else()
+ list(APPEND _args "-std=c++11 ")
+ endif()
list(APPEND _args "-x c++-header " ${_inc})
list(APPEND _args -c ${_header_filename} -o ${_pch_filename})
@@ -223,7 +228,12 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
list(APPEND _args ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
endif()
list(APPEND _args ${GXX_WARNING_FLAGS})
- list(APPEND _args "-std=c++11 ")
+ if (CYGWIN)
+ list(APPEND _args "-std=c++11 ")
+ list(APPEND _args "-U__STRICT_ANSI__")
+ else()
+ list(APPEND _args "-std=c++11 ")
+ endif()
list(APPEND _args "-x c++-header " ${_inc})
list(APPEND _args -c ${_header_filename} -o ${_gch_filename})