Fixed compiler frontend generation for Clang with GNU frontend on Win32
authorBasit Ayantunde <rlamarrr@gmail.com>
Wed, 17 Jul 2024 01:23:33 +0000 (02:23 +0100)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Wed, 17 Jul 2024 15:35:32 +0000 (10:35 -0500)
CMakeLists.txt

index f33780fd166f0b4ed925f4dd618fab7f93abf72f..f93611b6231fa1380760b24cb7868e7842002974 100644 (file)
@@ -170,7 +170,7 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
     target_compile_options(loader_common_options INTERFACE -Wno-missing-field-initializers)
 
     # need to prepend /clang: to compiler arguments when using clang-cl
-    if (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND "${CMAKE_CXX_SIMULATE_ID}" MATCHES "MSVC")
+    if (CMAKE_C_COMPILER_ID STREQUAL "Clang" AND "${CMAKE_C_COMPILER_FRONTEND_VARIANT}" MATCHES "MSVC")
         target_compile_options(loader_common_options INTERFACE /clang:-fno-strict-aliasing)
     else()
         target_compile_options(loader_common_options INTERFACE -fno-strict-aliasing)