← All tasks
cppgoogle/benchmark #1869Not a task: not reproduced

[BUG] Does not build with clang-cl

envgap__google__benchmark-1869

01 / FAILURE SIGNATURE

As reported upstream

4. See error
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
f65741b2bd92461dc2c816056eb9c996ae48ad62
Manifest
CMakeLists.txt
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

google/benchmark #1869 · read the original issue
**Describe the bug**
Due to adding the /MP option to MSVC like compilers, benchmark doesn't build on clang-cl or icx-cl as they don't handle it in any way, and will throw an unused command line option warning. Due to -Werror this will cause the compilation to fail. 

**System**
Which OS, compiler, and compiler version are you using:
  - OS: Windows 11
  - Compiler and version: Clang-cl 19

**To reproduce**
Steps to reproduce the behavior:
1. sync to commit ... master
2.  cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_LINKER=lld-link -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl
3. cmake --build build
4. See error

**Expected behavior**
Builds with no modification to cmakelists (removing MP solves it). 
The solution would be checking if it is clang, and if so omitting /MP. Not sure how to check for icx. 

**Screenshots**
![Image](https://github.com/user-attachments/assets/b67840a4-2724-4b19-beed-22d0ec5d7dbf)


**Additional context**
Also should affect icx-cl, as it is based on clang. 
Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]