On 2018-02-18 03:49-0700 Sam Edwards wrote:

However, when it came time to actually set this IS_INTERROGATE property, I
could find no way to apply it to a custom command. I guess this makes sense
- custom commands aren't targets, after all. But I couldn't convert my
custom command to a custom target, because it produces a C++ source file
and I need to use OUTPUT to let CMake know where that source file comes
from, and you can't use OUTPUT and TARGET together in add_custom_command.

Hi Sam:

It's quite common for each custom command to have a corresponding
custom target that DEPENDS on the OUTPUT of the custom command.  So
building the target part of that pair means the custom command is
executed *only if* the OUTPUT from it is out of date.

If you used that paradigm for the custom commands you refer to
above (where each such custom command is paired with a unique target
via the DEPENDS of the latter) could you not set the IS_INTERROGATE
property for the custom target part of of each pair whenever that
property is relevant?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

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:
https://cmake.org/mailman/listinfo/cmake

Reply via email to