CMake always recompile when using CC=clang CXX=clang++
Hi,
My issue is that cmake always recompile everything.
If I don't specify the compiler, cmake picks gcc and it works well; but if I set the environment variables CC=clang CXX=clang++ then cmake generates a broken build system which always re-compiles everything.
The behavior is the same with Ninja or GNU Makefiles.
Whith Make, cmake did put .PHONY rules for all objects.
21-04-19 23:35:19 2 abique@knot:~/d/b/d/c/linux-x64-sse41-debug hg:alex/trigger-condition> ninja -j 1 -d explain base-core
ninja explain: output /home/abique/develop/bitwig/dev4/cmake-builds/linux-x64-sse41-debug/CMakeFiles/VerifyGlobs.cmake_force of phony edge with no inputs doesn't exist
ninja explain: /home/abique/develop/bitwig/dev4/cmake-builds/linux-x64-sse41-debug/CMakeFiles/VerifyGlobs.cmake_force is dirty
ninja explain: /home/abique/develop/bitwig/dev4/cmake-builds/linux-x64-sse41-debug/CMakeFiles/cmake.verify_globs is dirty
[0/2] Re-checking globbed directories...
ninja explain: output /include/c++/10.2.0/cstdint of phony edge with no inputs doesn't exist
ninja explain: /include/c++/10.2.0/cstdint is dirty
ninja explain: output /include/c++/10.2.0/x86_64-pc-linux-gnu/bits/c++config.h of phony edge with no inputs doesn't exist
ninja explain: /include/c++/10.2.0/x86_64-pc-linux-gnu/bits/c++config.h is dirty
ninja explain: output /include/c++/10.2.0/x86_64-pc-linux-gnu/bits/os_defines.h of phony edge with no inputs doesn't exist
ninja explain: /include/c++/10.2.0/x86_64-pc-linux-gnu/bits/os_defines.h is dirty
ninja explain: output /include/c++/10.2.0/x86_64-pc-linux-gnu/bits/cpu_defines.h of phony edge with no inputs doesn't exist
ninja explain: /include/c++/10.2.0/x86_64-pc-linux-gnu/bits/cpu_defines.h is dirty
ninja explain: output /include/c++/10.2.0/pstl/pstl_config.h of phony edge with no inputs doesn't exist
ninja explain: /include/c++/10.2.0/pstl/pstl_config.h is dirty
ninja explain: output /include/c++/10.2.0/typeinfo of phony edge with no inputs doesn't exist
ninja explain: /include/c++/10.2.0/typeinfo is dirty
....
The includes it is looking for are in /usr/include/c++/10.2.0/
.
Thank you very much.
Edited by Alexandre Bique