From 3b5b067e13feeddc6d024cba84fef579036b00c4 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 16 Nov 2023 15:07:38 -0800 Subject: [PATCH] Disable MSVC conformance mode on UWP --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 731e0fdd6..085ee5097 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -373,8 +373,11 @@ if(MSVC) # - C26812 - Prefer 'enum class' over 'enum' (Code analysis warning) target_compile_options(Diligent-BuildSettings INTERFACE /W4 /wd4100 /wd4201 /wd4505 /wd26812 /MP ${DILIGENT_MSVC_COMPILE_OPTIONS}) - # Enable conformance mode - target_compile_options(Diligent-BuildSettings INTERFACE /permissive-) + if (PLATFORM_WIN32) + # Enable conformance mode. + # Note that UWP sources don't compile in conformance mode. + target_compile_options(Diligent-BuildSettings INTERFACE /permissive-) + endif() # In all release modes also: # - disable w4189 - local variable is initialized but not referenced