diff --git a/CMakeLists.txt b/CMakeLists.txt index c3c36ff77..ebdb3754b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,15 +5,15 @@ project(poac) # Preprocessor definitions add_definitions(-DPOAC_PROJECT_ROOT="${CMAKE_SOURCE_DIR}") add_definitions(-DPOAC_VERSION="0.1.2") -if(UNIX) +if(CYGWIN) + add_definitions(-D_GNU_SOURCE -DBOOST_ASIO_HAS_STD_STRING_VIEW -Wa,-mbig-obj) +elseif(UNIX) add_definitions("-fdiagnostics-color -Wall -Wextra -Werror") if(NOT APPLE) add_definitions(-D_GNU_SOURCE -DBOOST_ASIO_HAS_STD_STRING_VIEW) endif() elseif(WIN32) - if(CYGWIN) - add_definitions(-D_GNU_SOURCE -DBOOST_ASIO_HAS_STD_STRING_VIEW -Wa, -mbing-obj) - elseif(MSVC) + if(MSVC) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /MT") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_GNU_SOURCE /DBOOST_ASIO_HAS_STD_STRING_VIEW /mbig-obj") endif()