OK, wait, you left something out.... Here is my original post:
# only run if parser.e is newer than source.cmake
if(parser.e IS_NEWER_THAN source.cmake)
execute_process(COMMAND myparser parser.e --sources sources.cmake)
endif()
# include source.cmake, this file should set some vars
# something like set(SOURCES a.c b.c d.c)
include(sources.cmake)
******** This is what you left out **********
******** We have to make sure cmake re-runs when
******** input files to this change, the only way
******** to do that is to use them as an input to cmake
# now make parser.e an input to cmake, so that cmake will
# re-run when make is run and parser.e changes
configure_file(parser.e parser.e.flagfile)
add_custom_command( # add the custom command to run the full parser here)
-Bill
_______________________________________________
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