On Tue, Oct 13, 2009 at 4:16 PM, Hendrik Sattler <[email protected]> wrote: > Hi, > > when changing a CMakeLists.txt file and calling make, then cmake automatically > runs. I want to achieve the same thing but for specific files. > > The situation: DocBook/XML files are parsed at cmake times to get the names of > the output files. If the docbook files change, the names of the output files > may > also change, so cmake needs to be run again to update the rules. > > How can this be done? > > Thanks > > HS > _______________________________________________ > Powered by www.kitware.com > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Follow this link to subscribe/unsubscribe: > http://www.cmake.org/mailman/listinfo/cmake >
Yes. What you need to do is add the DocBook/XML files to the dependency list of the add_custom_command that is used to generate the output file. When those files change, then the add_custom_command will be run again. See the documentation for add_custom_command. James _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
