diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-09-05 12:10:53 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-09-05 12:10:53 -0400 |
| commit | ba7836ea4859b244bf2c7749cc91853ea5512e26 (patch) | |
| tree | 8078faaa387fae198822eca8ff15d847bcf4aefa | |
| parent | a76a72469bf5980946fad8f8e60f07edde543ce5 (diff) | |
| download | zig-ba7836ea4859b244bf2c7749cc91853ea5512e26.tar.gz zig-ba7836ea4859b244bf2c7749cc91853ea5512e26.zip | |
stage1: fix build on macos
| -rw-r--r-- | CMakeLists.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 314b81e2f3..c3ee37ea89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -772,12 +772,8 @@ include_directories( "${CMAKE_SOURCE_DIR}/src" ) -if(MSVC) - set(EXE_CFLAGS "-std=c++11") -else() - set(EXE_CFLAGS "-std=c++11 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-exceptions -fno-rtti -Werror=strict-prototypes -Werror=old-style-definition -Werror=type-limits -Wno-missing-braces") -endif() - +# These have to go before the -Wno- flags +set(EXE_CFLAGS "-std=c++11") if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") if(MSVC) set(EXE_CFLAGS "${EXE_CFLAGS} /w") @@ -788,6 +784,12 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") endif() endif() +if(MSVC) + set(EXE_CFLAGS "${EXE_CFLAGS}") +else() + set(EXE_CFLAGS "${EXE_CFLAGS} -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -fno-exceptions -fno-rtti -Werror=strict-prototypes -Werror=old-style-definition -Werror=type-limits -Wno-missing-braces") +endif() + set(EXE_LDFLAGS " ") if(MINGW) |
