<div>Hi Kris,</div>
<div><br></div>
<div>I have done that by following:</div>
<div>1) use Ninja Generator;</div>
<div>2) include empty "rerun.cmake" file, I put this file into binary dir, so I need a patch;</div>
<div>3) add a patch to Ninja Generator to correctly write dependencies for "build.ninja" from included cmake files, if cmake file is in the binary directory;</div>
<div>4) add a custom commands that check the new files and touching "rerun.cmake" file;</div>
<div>5) once "rerun.cmake" file is touched ninja will rerun cmake;</div>
<div><br></div>
<div>Best regards,</div>
<div>Sergey</div>
<div class="mailbox_signature">—<br>Sent from <a href="https://www.dropbox.com/mailbox">Mailbox</a> for iPhone</div>
<br><br><div class="gmail_quote"><p>On Tue, Oct 15, 2013 at 7:02 AM, Malfettone, Kris <span dir="ltr"><<a href="mailto:Kris.Malfettone@sig.com" target="_blank">Kris.Malfettone@sig.com</a>></span> wrote:<br></p><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Anyone?<br><br><br></span></p>
<p class="MsoNormal"><span style="color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style='font-size:10.0pt; font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt; font-family:"Tahoma","sans-serif"'> cmake-bounces@cmake.org [mailto:cmake-bounces@cmake.org]
<b>On Behalf Of </b>Malfettone, Kris<br><b>Sent:</b> Thursday, October 03, 2013 8:43 AM<br><b>To:</b> cmake@cmake.org<br><b>Subject:</b> [CMake] Correct way to make an arbitrary file trigger a reconfigure...</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">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.</p>
<p class="MsoNormal">For example:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">configure_file( file_i_care_about.txt ${CMAKE_CURRENT_BINARY_DIR}/tmp_file_that_isn’t_used.txt )</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">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.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">-Kris</p>
</div>
<p class="MsoNormal"><span style='font-size:12.0pt; font-family:"Times New Roman","serif"'> </span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style='font-size:12.0pt; font-family:"Times New Roman","serif"'>
<hr size="2" width="100%" align="center"></span></div>
<p class="MsoNormal"><span style='font-size:7.5pt; font-family:"Arial","sans-serif"; color:gray'><br>
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.</span><span style='font-size:12.0pt; font-family:"Times New Roman","serif"'></span></p>
</div>
<br><hr><font face="Arial" color="Gray" size="1"><br>
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.<br></font>
</blockquote></div><br>