]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: exclude `-MP` for `clang-cl` again
authorViktor Szakats <commit@vsz.me>
Mon, 3 Mar 2025 23:26:45 +0000 (00:26 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 4 Mar 2025 00:01:09 +0000 (01:01 +0100)
To avoid this warning/error (seen with Ninja generator):
```
clang-cl: warning: argument unused during compilation: '-MP' [-Wunused-command-line-argument]
```

Curious why CI missed it. Maybe due to using a Visual Studio generator.

Regression from e0fd5790d94feb239f7d2457578f2a34c85cdd65 #16004
Closes #16550

CMakeLists.txt

index 3bfea86fe52f3c7e7d1d58daa01f28a8b761389f..2f9a7361168689cf91df3548ead362b685ca9f88 100644 (file)
@@ -1986,7 +1986,7 @@ if(WIN32)
   endif()
 endif()
 
-if(MSVC)
+if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")  # MSVC but exclude clang-cl
   string(APPEND CMAKE_C_FLAGS " -MP")  # Parallel compilation
 endif()