diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7655db1a8..de3f7d550 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,23 +7,25 @@ set(CMAKE_COLOR_MAKEFILE ON) enable_testing() set(LEAN_EXTRA_LINKER_FLAGS "") +set(LEAN_EXTRA_CXX_FLAGS "") # Windows does not support ulimit -s unlimited. So, we reserve a lot of stack space: 100Mb if((${CYGWIN} EQUAL "1") OR (${CMAKE_SYSTEM_NAME} MATCHES "Windows")) message(STATUS "Windows detected") set(LEAN_EXTRA_LINKER_FLAGS "${LEAN_EXTRA_LINKER_FLAGS} -Wl,--stack,104857600") + set(LEAN_EXTRA_CXX_FLAGS "${LEAN_EXTRA_CXX_FLAGS} -D LEAN_DEFAULT_PP_UNICODE=false") endif() # Set Module Path set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") # Initialize CXXFLAGS. -set(CMAKE_CXX_FLAGS "-Wall -std=c++11") +set(CMAKE_CXX_FLAGS "-Wall -std=c++11 ${LEAN_EXTRA_CXX_FLAGS}") set(CMAKE_CXX_FLAGS_DEBUG "-g -DLEAN_DEBUG -DLEAN_TRACE") set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g") -set(CMAKE_CXX_FLAGS_TESTCOV "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage") +set(CMAKE_CXX_FLAGS_TESTCOV "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage") # Compiler-specific C++11 activation. if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")