Hi all,

I'm working on using CMake to create a build system that targets an
incredibly hard-to-deal-with IDE/build system, used for doing some embedded
programming (Xilinx's Vivado suite).

One of the pieces I need to get working is a conditional dependency between
two files (a project-file generator script that gets archived in Git, and
the actual project files that get generated).

The graph basically looks like this:

Path 1: .tcl file (in Git) -> .xpr file (used by IDE)
Path 2: .xpr file (after a user changes something in the IDE) -> .tcl file
(needs to be regenerated)

So on any clean build, the source-controlled TCL file autogenerates a bunch
of required project files. On iterative builds at a developer's desk, he
might change some IDE setting and then the TCL file needs to be regenerated
(without triggering a rebuild of the project files as well). It's kind of a
conditional and/or psuedo-circular dependency.

In pure GNU Make, I can express a conditional dependency with an 'if'
statement that uses timestamp checks. It's also easy for me to express this
dependency in CMakeLists.txt - I can check the file timestamps, and I can
conditionally emit the relevant custom_target/custom_rule.

That only works when CMakeLists.txt gets parsed, however. Is there any way
for me to force a CMake-generated Makefile to _always_ rerun CMake before
trying to build the 'all' target? If not, is there any other clever way
that I could express this conditional dependency?

-Nick
-- 

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:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to