stage1: fix build on macos

This commit is contained in:
Andrew Kelley 2018-09-05 12:10:53 -04:00
parent a76a72469b
commit ba7836ea48

View File

@ -772,12 +772,8 @@ include_directories(
"${CMAKE_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/src"
) )
if(MSVC) # These have to go before the -Wno- flags
set(EXE_CFLAGS "-std=c++11") 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()
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
if(MSVC) if(MSVC)
set(EXE_CFLAGS "${EXE_CFLAGS} /w") set(EXE_CFLAGS "${EXE_CFLAGS} /w")
@ -788,6 +784,12 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
endif() endif()
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 " ") set(EXE_LDFLAGS " ")
if(MINGW) if(MINGW)