oneapi-src / level-zero

oneAPI Level Zero Specification Headers and Loader
https://spec.oneapi.com/versions/latest/elements/l0/source/index.html
MIT License
211 stars 90 forks source link

Fix build when using clang-cl on Windows #129

Closed kbenzie closed 9 months ago

kbenzie commented 9 months ago

The Clang front-end provided with Visual Studio, clang-cl.exe, does not support the /Qspectre or /MP compiler flags. This patch adds logic to check that the CMAKE_C_COMPILER_ID/CMAKE_CXX_COMPILER_ID variables are not Clang before appending the unsupported flags to CMAKE_C_FLAGS/CMAKE_CXX_FLAGS.