diff options
author | Robin Lindén <dev@robinlinden.eu> | 2018-11-10 14:05:55 (GMT) |
---|---|---|
committer | Robin Lindén <dev@robinlinden.eu> | 2018-11-10 14:20:26 (GMT) |
commit | 826656b25f62ed0a2fadc7c5dde303616e621c08 (patch) | |
tree | 01db8e689dc6d256d0a5d65dad6d714cc39b8273 /googletest/cmake/internal_utils.cmake | |
parent | de5be0eb28b74ecd6335e3bd61d9dc8914ce0e57 (diff) | |
download | googletest-826656b25f62ed0a2fadc7c5dde303616e621c08.zip googletest-826656b25f62ed0a2fadc7c5dde303616e621c08.tar.gz googletest-826656b25f62ed0a2fadc7c5dde303616e621c08.tar.bz2 |
Remove workarounds for unsupported MSVC versions
Diffstat (limited to 'googletest/cmake/internal_utils.cmake')
-rw-r--r-- | googletest/cmake/internal_utils.cmake | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/googletest/cmake/internal_utils.cmake b/googletest/cmake/internal_utils.cmake index 9867436..9be14c9 100644 --- a/googletest/cmake/internal_utils.cmake +++ b/googletest/cmake/internal_utils.cmake @@ -68,31 +68,6 @@ macro(config_compiler_and_linker) # Newlines inside flags variables break CMake's NMake generator. # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds. set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J -Zi") - if (MSVC_VERSION LESS 1400) # 1400 is Visual Studio 2005 - # Suppress spurious warnings MSVC 7.1 sometimes issues. - # Forcing value to bool. - set(cxx_base_flags "${cxx_base_flags} -wd4800") - # Copy constructor and assignment operator could not be generated. - set(cxx_base_flags "${cxx_base_flags} -wd4511 -wd4512") - # Compatibility warnings not applicable to Google Test. - # Resolved overload was found by argument-dependent lookup. - set(cxx_base_flags "${cxx_base_flags} -wd4675") - endif() - if (MSVC_VERSION LESS 1500) # 1500 is Visual Studio 2008 - # Conditional expression is constant. - # When compiling with /W4, we get several instances of C4127 - # (Conditional expression is constant). In our code, we disable that - # warning on a case-by-case basis. However, on Visual Studio 2005, - # the warning fires on std::list. Therefore on that compiler and earlier, - # we disable the warning project-wide. - set(cxx_base_flags "${cxx_base_flags} -wd4127") - endif() - if (NOT (MSVC_VERSION LESS 1700)) # 1700 is Visual Studio 2012. - # Suppress "unreachable code" warning on VS 2012 and later. - # http://stackoverflow.com/questions/3232669 explains the issue. - set(cxx_base_flags "${cxx_base_flags} -wd4702") - 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") set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1") @@ -219,7 +194,7 @@ 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. + if (MSVC) # BigObj required for tests. set(cxx_flags "${cxx_flags} -bigobj") endif() |