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: remove clang-cl compilation warning #1895

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

theComputeKid
Copy link

@theComputeKid theComputeKid commented Dec 28, 2024

The /MP flag only applies to cl, not cl frontends to other compilers (e.g. clang-cl, icx-cl etc), whereas the MSVC cmake variable applies to every compiler with a cl frontend. Therefore, we need to reduce the scope of /MP to only MSVC's cl, so that the other cl frontends can compile without warnings.

Fixes #1869

Reproduction steps to test solution on Windows with the LLVM toolchain installed:

cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER=lld-link -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON
cmake --build build
ctest --test-dir build

- MP flag only applies to cl, not cl frontends to other compilers (e.g. clang-cl, icx-cl etc).
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.

[BUG] Does not build with clang-cl
1 participant