Utilities/std: Using `CMake_RUN_CLANG_TIDY` leads to undefined identifer std
I am compiling CMake master on Arch Linux (GCC 11.1.0, Clang 12.0.1) and using
CMake_RUN_CLANG_TIDY = ON
I have the following error:
[1/417] Building CXX object Utilities/std/CMakeFiles/cmstd.dir/Release/cm/bits/fs_path.cxx.o
FAILED: Utilities/std/CMakeFiles/cmstd.dir/Release/cm/bits/fs_path.cxx.o
/home/charles/Software/install/cmake/bin/cmake -E __run_co_compile --launcher=ccache --tidy="/usr/bin/clang-tidy;--extra-arg-before=--driver-mode=g++" --source=/home/charles/Software/sources/cmake/master/Utilities/std/cm/bits/fs_path.cxx -- /usr/bin/c++ -DCMAKE_INTDIR=\"Release\" -I/home/charles/Software/sources/cmake/master/build/Utilities -isystem /home/charles/Software/sources/cmake/master/Utilities/std -isystem /home/charles/Software/sources/cmake/master/Utilities -Wall -Wextra -Wshadow -Woverloaded-virtual -Wno-deprecated -Wno-strict-overflow -Wno-array-bounds -Wunreachable-code -fdiagnostics-color=always -O3 -DNDEBUG -MD -MT Utilities/std/CMakeFiles/cmstd.dir/Release/cm/bits/fs_path.cxx.o -MF Utilities/std/CMakeFiles/cmstd.dir/Release/cm/bits/fs_path.cxx.o.d -o Utilities/std/CMakeFiles/cmstd.dir/Release/cm/bits/fs_path.cxx.o -c /home/charles/Software/sources/cmake/master/Utilities/std/cm/bits/fs_path.cxx
/home/charles/Software/sources/cmake/master/Utilities/std/cm/filesystem:40:7: error: use of undeclared identifier 'std' [clang-diagnostic-error]
using std::filesystem::path;
^
Disabling this option solve the issue.
Edited by Brad King