From ba22eb600e62ddaee0a83f2037c4bc0c3ccd3cdd Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 26 Oct 2022 19:19:28 +0200 Subject: [PATCH] MSVC specific: Enabled /permissive- to enforce C++ standards. --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 70b7ed567..418a5d9c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,8 @@ if (MSVC) # C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data. An integer type is converted to a smaller integer type. # C4267: The compiler detected a conversion from size_t to a smaller type. add_compile_options(/wd4244 /wd4267) + # Enforce strict C++ conformance, so our code that compiles on MSVC also compiles on GCC and clang. + add_compile_options(/permissive-) endif () if (MINGW)