Closed joshdorsey closed 10 months ago
we should be skipping that test (fairly obviously given the name) when we're building for greater than c++03. https://github.com/google/benchmark/blob/main/test/CMakeLists.txt#L181 is the relevant bit of the build config.
clang on windows may be the "unusual" bit here. perhaps we need to extend that conditional?
Describe the bug A clean build of the google benchmark library as described here fails with an error after the last command: "C++11 or greater detected. Should be C++03."
System Which OS, compiler, and compiler version are you using:
To reproduce Steps to reproduce the behavior:
cmake -E make_directory "build"
cmake -E chdir "build" cmake -DBENCHMARK_DOWNLOAD_DEPENDENCIES=on -GNinja -DCMAKE_BUILD_TYPE=Release ../
cmake --build "build" --config Release
Expected behavior The library to build successfully and to be able to link against it.
Additional context I noticed there were some other (closed) tickets with the same issue that didn't have satisfying resolutions for my situation, but they seemed to be using more unconventional compilers than me. The Google benchmark library I do have compiled from a couple years ago (835951a) complains about being built in debug mode when you run it, surely this would happen to anyone building the benchmark library how it's intended to be built and then linking their debug-mode code against it? Maybe that's a bad idea to begin with on my part, not sure. I also noticed that
-std=c++14
ends up in the command line that causes the error, I assume that's the cause but I didn't do anything to make it do that, this is just in its own folder.Thanks 😄