diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e87f4a84abf6..a740088a6399 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,12 @@ include(AbseilHelpers) # config options -set(ABSL_STD_CXX_FLAG "-std=c++11" CACHE STRING "c++ std flag (default: c++11)") +if (MSVC) + add_definitions(/DNOMINMAX /DWIN32_LEAN_AND_MEAN=1 /D_CRT_SECURE_NO_WARNINGS) + add_compile_options(/W3 /WX /wd4005 /wd4068 /wd4244 /wd4267 /wd4800) +else() + set(ABSL_STD_CXX_FLAG "-std=c++11" CACHE STRING "c++ std flag (default: c++11)") +endif() @@ -66,9 +71,6 @@ check_target(gmock) # -fexceptions set(ABSL_EXCEPTIONS_FLAG "${CMAKE_CXX_EXCEPTIONS}") -# fix stuff -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FIX_MSVC} ${CMAKE_CXX_FLAGS}") - list(APPEND ABSL_TEST_COMMON_LIBRARIES gtest_main gtest |