On Wed, Sep 11, 2019 at 9:49 PM Kyle Edwards <kyle.edwa...@kitware.com>
wrote:

> You can list them or not list them. CMake will recognize them as header
> files and ignore them (not attempt to compile them.) It's a matter of
> personal preference. CMake's own CMake script lists them, but there are
> plenty of projects that don't and work just fine.


And it far as IDE generators (Xcode, CodeBlocks etc) go - don't they care
about headers?


> > Another question - how does cmake know to create the
> > dependency between the target and the header file, even when it is
> > not listed explicitly?
>
> It uses GCC's -MD and -MF options (and the equivalents for other
> compilers), which spits out the header dependency information.


That is awesome. Thanks!
-- 

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to