diff --git a/CMakeLists.txt b/CMakeLists.txt index 36583e14..bf76c372 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -364,7 +364,7 @@ endif() if(MSVC) # Turn off permissive mode to be more standards-compliant and avoid compiler errors. - target_compile_options(loot PRIVATE "/permissive-" "/W4") + target_compile_options(loot PRIVATE "/Zc:__cplusplus" "/permissive-" "/W4") endif() ############################## diff --git a/cmake/tests.cmake b/cmake/tests.cmake index 985c898d..2584fe26 100644 --- a/cmake/tests.cmake +++ b/cmake/tests.cmake @@ -166,10 +166,11 @@ endif() if(MSVC) # Turn off permissive mode to be more standards-compliant and avoid compiler errors. - target_compile_options(libloot_tests PRIVATE "/permissive-" "/W4") + target_compile_options(libloot_tests PRIVATE "/Zc:__cplusplus" "/permissive-" "/W4") # Set /bigobj to allow building Debug and RelWithDebInfo tests target_compile_options(libloot_internals_tests PRIVATE + "/Zc:__cplusplus" "/permissive-" "/W4" "$<$,$>:/bigobj>")