Explorar o código

build system: make it work properly (again) with clang-cl

Michele Caini %!s(int64=6) %!d(string=hai) anos
pai
achega
93533b7bc6
Modificáronse 1 ficheiros con 6 adicións e 6 borrados
  1. 6 6
      test/CMakeLists.txt

+ 6 - 6
test/CMakeLists.txt

@@ -43,17 +43,17 @@ function(SETUP_TARGET TARGET_NAME)
     target_compile_options(
         ${TARGET_NAME}
         PRIVATE
-            $<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-pedantic -fvisibility=hidden -Wall -Wshadow -Wno-deprecated-declarations>
-            $<$<CXX_COMPILER_ID:MSVC>:/EHsc /W1 /wd4996>
+            $<$<NOT:$<PLATFORM_ID:Windows>>:-pedantic -fvisibility=hidden -Wall -Wshadow -Wno-deprecated-declarations>
+            $<$<PLATFORM_ID:Windows>:/EHsc /W1 /wd4996>
     )
 
     target_compile_options(
         ${TARGET_NAME}
         PRIVATE
-            $<$<AND:$<CONFIG:Debug>,$<NOT:$<CXX_COMPILER_ID:MSVC>>>:-O0 -g>
-            $<$<AND:$<CONFIG:Release>,$<NOT:$<CXX_COMPILER_ID:MSVC>>>:-O2>
-            $<$<AND:$<CONFIG:Debug>,$<CXX_COMPILER_ID:MSVC>>:/Od>
-            $<$<AND:$<CONFIG:Release>,$<CXX_COMPILER_ID:MSVC>>:/O2>
+            $<$<AND:$<CONFIG:Debug>,$<NOT:$<PLATFORM_ID:Windows>>>:-O0 -g>
+            $<$<AND:$<CONFIG:Release>,$<NOT:$<PLATFORM_ID:Windows>>>:-O2>
+            $<$<AND:$<CONFIG:Debug>,$<PLATFORM_ID:Windows>>:/Od>
+            $<$<AND:$<CONFIG:Release>,$<PLATFORM_ID:Windows>>:/O2>
     )
 endfunction()