From e7e9ce4baf73e2ac1126975e2e77ca1ee83cc6d7 Mon Sep 17 00:00:00 2001 From: Ulrich Mohr Date: Tue, 7 Feb 2023 13:25:13 +0100 Subject: [PATCH] one more warning suppressed in MSVC --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 365365701..a1078da42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,8 @@ endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") # Manually tweak MSVC to emit (about) the same warnings as clang and gcc on linux - add_compile_options("/permissive-" /wd4267 /wd4244 /wd4244 /wd4305 /wd4805 /wd4267 /wd4646 /wd4065 /Dand=&& /Dor=|| /Dnot=!) + # needs to be done here using add_compile_definitions() (as opposed to target_compile_definitions()) to be available for all binaries and libraries + add_compile_options("/permissive-" /wd4267 /wd4244 /wd4244 /wd4305 /wd4805 /wd4267 /wd4646 /wd4065 /wd4996 /Dand=&& /Dor=|| /Dnot=!) add_compile_definitions(NOMINMAX) endif()