google / benchmark

A microbenchmark support library
Apache License 2.0
8.61k stars 1.57k forks source link

[BUG] cmake generate fails with msvc and clang-cl #1611

Open hsdk123 opened 1 year ago

hsdk123 commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

cmake fails at https://github.com/google/benchmark/blob/main/CMakeLists.txt#L298

when using cmake on msvc with clang-cl settings https://learn.microsoft.com/en-us/cpp/build/clang-support-cmake?view=msvc-170

System Which OS, compiler, and compiler version are you using:

To reproduce Steps to reproduce the behavior:

  1. sync to commit ...
  2. cmake/bazel...
  3. make ...
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

dmah42 commented 1 year ago

can you please set -DCXXFEATURECHECK_DEBUG=on, retry, and attach the cmake logs please? that should help us determine why the msvc+clang config is failing to identify a working regex solution.

(btw is it correct that both the C and C++ compiler are clang-cl? that's a little surprising to me as usually (not-windows) these are different binaries).