File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,20 +45,27 @@ endif()
4545set (CMAKE_INCLUDE_CURRENT_DIR ON )
4646set (CMAKE_CXX_STANDARD 14)
4747set (CMAKE_CXX_STANDARD_REQUIRED ON )
48- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-sign-compare " )
48+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} " )
4949set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} " )
5050set (CMAKE_CXX_FLAGS_RELEASE "-O3" ) # enable assert
5151set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g" ) # enable assert
5252set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} " )
5353set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} " )
5454
5555if ("${CMAKE_CXX_COMPILER_ID} " STREQUAL "GNU" )
56- set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp -Wno-int-in-bool-context" )
56+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall - fopenmp -Wno-int-in-bool-context -Wno-sign-compare " )
5757 set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fsanitize=address" )
5858 set (CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} " )
5959 set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address" )
6060endif ()
6161
62+ if (MSVC )
63+ # Enable M_PI and disable fopen() etc. warnings
64+ ADD_DEFINITIONS (-D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS )
65+ # Disable the following warnings : C4267 and 4244 (conversions) C4018 (sign compare) and C4800 (bool to int)
66+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W3 /wd4267 /wd4244 /wd4018 /wd4800" )
67+ endif ()
68+
6269
6370include_directories (src )
6471include_directories (3rd/pcg32 )
You can’t perform that action at this time.
0 commit comments