]> git.lyx.org Git - features.git/commitdiff
Windows: fix in CMakeLists for warning flags.
authorThibaut Cuvelier <tcuvelier@lyx.org>
Wed, 2 Sep 2020 13:05:20 +0000 (15:05 +0200)
committerThibaut Cuvelier <tcuvelier@lyx.org>
Wed, 2 Sep 2020 13:06:13 +0000 (15:06 +0200)
/Wp64 was used to debug 64-bit incompatibilities. /W4 is used for warnings.

Don't enable /Wx to turn warnings into errors, as the dependencies won't build.

CMakeLists.txt

index 62eff71df3ca199f044f646bba2ec1a7e1deccc1..d3aa1928fb81bd7a9bf38653fe52e56c5a1dd674 100644 (file)
@@ -1072,9 +1072,9 @@ if(MSVC)
                # add here warnings which should be disabled /wdXXXX
                set(MSVC_W_DISABLE "/wd4288 /wd4355 /wd4800 /wd4996 /wd4311 /wd4312 /wd4505 /wd4267 /wd4512 /wd4245 /wd4127 /wd4180 /wd4231")
 
-               set(CMAKE_CXX_FLAGS_DEBUG      "${CMAKE_CXX_FLAGS_DEBUG} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
-               set(CMAKE_CXX_FLAGS_RELEASE    "${CMAKE_CXX_FLAGS_RELEASE} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
-               set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /Wp64 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
+               set(CMAKE_CXX_FLAGS_DEBUG      "${CMAKE_CXX_FLAGS_DEBUG} /W4 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
+               set(CMAKE_CXX_FLAGS_RELEASE    "${CMAKE_CXX_FLAGS_RELEASE} /W4 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
+               set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /W4 ${MSVC_W_ERROR} ${MSVC_W_DISABLE}")
 
        else()
                set(CMAKE_CXX_WARNING_LEVEL 3 CACHE STRING "Warning level" FORCE)