[CMake] Correct way to make an arbitrary file trigger a reconfigure...

Malfettone, Kris Kris.Malfettone at sig.com
Thu Oct 3 08:43:23 EDT 2013


Hi, I am trying to make cmake reconfigure whenever a certain file is touched.  This is because the file ends up listing out a set of directories that need to be built during the build.  Currently I do a trick where I use configure file to write out a file that will never be used but causes the input file to trigger reconfigures.
For example:

configure_file( file_i_care_about.txt ${CMAKE_CURRENT_BINARY_DIR}/tmp_file_that_isn't_used.txt )

Is there another recommended way or is this the best approach.  I have tried searching for this but haven't found anything on it yet.

-Kris

________________________________

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20131003/9fac0ee8/attachment.htm>


More information about the CMake mailing list