MSVC fixes
This commit is contained in:
parent
79610733f4
commit
79ae60ed97
4 changed files with 16 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue