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
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake