[CMake] Prefix header for Makefiles

Bill Hoffman bill.hoffman at kitware.com
Wed Aug 26 12:37:54 EDT 2015


CMake does not really support this.  At build time CMake scans the 
source files and builds the depend list.  Since your file is not 
actually included it does not end up in the depend list.  To add this as 
a feature you would have to put the information into DependInfo.cmake 
and have cmDependsC.cxx read the information.  If you are interested, I 
would suggest you come up with a patch and post it to the 
cmake-developer mailing list.  You could also try the ninja generator as 
it uses the compiler to compute depends and should have the correct 
information.

-Bill



More information about the CMake mailing list