diff options
author | Arkadiy Shapkin <arkady.shapkin@gmail.com> | 2017-05-03 10:40:33 (GMT) |
---|---|---|
committer | Arkady Shapkin <arkady.shapkin@gmail.com> | 2017-10-25 13:04:01 (GMT) |
commit | 2641b021fc2ab12896cf868d90f19936ef4b4696 (patch) | |
tree | 94f1a3f223b38d4830d639f8b892378ff8c69443 /googletest/cmake | |
parent | 77380cddf77133b98a16b5427ac732648233de29 (diff) | |
download | googletest-2641b021fc2ab12896cf868d90f19936ef4b4696.zip googletest-2641b021fc2ab12896cf868d90f19936ef4b4696.tar.gz googletest-2641b021fc2ab12896cf868d90f19936ef4b4696.tar.bz2 |
Fix tests with VS2015 and VS2017
Diffstat (limited to 'googletest/cmake')
-rw-r--r-- | googletest/cmake/internal_utils.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 9915c11..c54bc94 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -87,10 +87,6 @@ macro(config_compiler_and_linker) # http://stackoverflow.com/questions/3232669 explains the issue. set(cxx_base_flags "${cxx_base_flags} -wd4702") endif() - if (NOT (MSVC_VERSION GREATER 1900)) # 1900 is Visual Studio 2015 - # BigObj required for tests. - set(cxx_base_flags "${cxx_base_flags} -bigobj") - endif() set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32") set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN") @@ -187,6 +183,10 @@ endfunction() # is built from the given source files with the given compiler flags. function(cxx_executable_with_flags name cxx_flags libs) add_executable(${name} ${ARGN}) + if (MSVC AND (NOT (MSVC_VERSION LESS 1700))) # 1700 is Visual Studio 2012. + # BigObj required for tests. + set(cxx_flags "${cxx_flags} -bigobj") + endif() if (cxx_flags) set_target_properties(${name} PROPERTIES |