I’m using clang-tidy for static analysis by defining CMAKE_CXX_CLANG_TIDY to the system installed clang-tidy executable.
I want to set the C++ Standard to C++23.
When using g++ (Version 13.1) cmake sets the command line parameter to “-std=gnu++23”.
Unfortunately the installed clang-tidy (Version 16.0.6) executable doesn’t recognize this parameter and fails with a “clang-diagnostic-error” - it expects the parameter set to “gnu++2b”.
When using clang as compiler CMake sets the parameter to the expected value and works together with clang-tidy.
Do you now a way to modify the command line for g++ / clang-tidy to work together?
Regards Thomas