Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build when using clang-cl on Windows #129

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

kbenzie
Copy link
Contributor

@kbenzie kbenzie commented Nov 30, 2023

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.

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`.

Signed-off-by: Kenneth Benzie (Benie) <[email protected]>
@nrspruit nrspruit merged commit b115569 into oneapi-src:master Nov 30, 2023
1 check passed
lisanna-dettwyler pushed a commit to lisanna-dettwyler/level-zero that referenced this pull request Jan 23, 2024
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`.

Signed-off-by: Kenneth Benzie (Benie) <[email protected]>
Jemale pushed a commit to Jemale/level-zero that referenced this pull request Jun 17, 2024
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`.

Signed-off-by: Kenneth Benzie (Benie) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants