Precompiled headers - Clang-tidy issues
Here is my project so you can reproduce the problem: https://github.com/hdf89shfdfs/PitoEngine
I'm trying to use clang-tidy on windows with clang on windows support. Facilitated by Microsoft's CMakeSettings.json support.
find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_CLANG_TIDY ${CLANG_TIDY_COMMAND} -checks=-*,readability-*)
I'm able to configure the project just fine. However, clang-tidy fails.
FAILED: dep/utility/CMakeFiles/util.dir/src/core/util_assert.cpp.obj
D:\Github\PitoEngine\dep\utility\src\core\util_assert.cpp(6,40): error G30564CF7: use of undeclared identifier 'std' [clang-diagnostic-error]
void Assert(bool const& predicate, std::string const& message)
^
I believe clang-tidy is not picking up the precompiled header I'm using.
If you take away the cmake code that is used to run clang-tidy my code builds/runs just fine.