Open GPMueller opened 4 years ago
I would suggest the following approach, close to what CMake does:
build/.../targetname/buildtype/pch/combination.h|hpp
clang++ -x c++-header combination.hpp -o combination.hpp.pch
+ flags (note we need to distinguish between languages)-include combination.hpp
-include
flag should go into the interface_include_directories
?Notes:
-include
flag is necessary for all sources which should use the pch. This makes it a little more difficult to use correctly and consistentlyQuestions:
The ability to precompile headers was recently added to CMake 3.16 (docs), and we should add support in some fashion, too.
Clang documentation is here and here.