Revert "Cleanup/MSVC: Enable C++ conformance mode on compiler versions that support it."

It is breaking compilation on some configurations, revert for now while
i see what is wrong.

This reverts commit 9fe469c110.
This commit is contained in:
Ray Molenkamp
2020-02-13 07:04:30 -07:00
parent d1cd3ec9ba
commit 6022cd015f
5 changed files with 14 additions and 37 deletions

View File

@@ -144,19 +144,6 @@ else()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /nologo /J /Gd /MP /bigobj")
endif()
# C++ standards conformace (/permissive-) is available on msvc 15.5 (1912) and up
if(MSVC_VERSION GREATER 1911 AND NOT MSVC_CLANG)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /permissive-")
# MSVC 2017 emits a whole lot of warnings (C4199) about two-phase lookup
# in combination with OpenMP, however my current MSVC2019 (16.4) does not.
# From the documentation it is not entirely clear when this got solved,
# so for any compiler versions >= 15.5 and < 16.4 opt in to the old non-conforming behavior.
if(MSVC_VERSION LESS 1924)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zc:twoPhase-")
endif()
endif()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd /ZI")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MDd /ZI")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD")