[CMake] How to declare a text file as CMakeLists.txt dependency

Gregor Jasny gjasny at googlemail.com
Tue Apr 3 05:33:10 EDT 2012


Hello,

In my root project CMakeLists.txt file I'm using the file(STRINGS ...) 
command to read some version numbers from a text file. Now I'd like to 
declare this text file as a CMakeLists.txt dependency to re-trigger the 
CMake configuration step if a version number changes (Just like 
re-configuration is triggered if I touch any CMakeLists.txt file).

Is there an easy way to accomplish this?

Thanks,
Gregor


More information about the CMake mailing list