How to make a Fortran file dependent on #inclde files

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
Report Content as Inappropriate

How to make a Fortran file dependent on #inclde files




I have a Fortran project with numerous #include files. When a #include file is changed, CMake does not detect the change, and does not rebuild the objects using this include file. In order to reflect the change, currently I  ‘make clean; make’, which rebuilds the entire project.  Is there a way to tell CMake that a Fortran file depends from its #include files?


Thanks in advance,



P.S. I use cmake-3.4.3


Powered by

Please keep messages on-topic and check the CMake FAQ at:

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: