<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style>
<!--
@font-face
        {font-family:Calibri}
@font-face
        {font-family:Tahoma}
@font-face
        {font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif"}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline}
pre
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
tt
        {font-family:"Courier New"}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif"}
span.HTMLPreformattedChar
        {font-family:Consolas}
span.EmailStyle20
        {font-family:"Calibri","sans-serif";
        color:#1F497D}
span.BalloonTextChar
        {font-family:"Tahoma","sans-serif"}
.MsoChpDefault
        {font-family:"Calibri","sans-serif"}
@page WordSection1
        {margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
        {}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Thank you both for you responses.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">As a side note, it might be nice to add a function to cmake along the lines of add_cmake_cache_dependency(…) or some better name that just adds the dependency
without having to configure a dummy file.</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">-Kris</span></p>
<p class="MsoNormal"><span style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<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""> David Cole [mailto:dlrdave@aol.com]
<br>
<b>Sent:</b> Tuesday, October 15, 2013 8:55 AM<br>
<b>To:</b> slekhano@gmail.com; kris.malfettone@sig.com<br>
<b>Cc:</b> cmake@cmake.org<br>
<b>Subject:</b> Re: [CMake] Correct way to make an arbitrary file trigger a reconfigure...</span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">Kris,<br>
<br>
I would use your configure_file construct if I had a reason to do this. It will work regardless of platform or CMake generator chosen... I would even go so far as to call it "the recommended way."</span></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">HTH,<br>
David</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">-----Original Message-----<br>
From: Sergey Lekhanov <<a href="mailto:slekhano@gmail.com">slekhano@gmail.com</a>><br>
To: Kris Malfettone <<a href="mailto:kris.malfettone@sig.com">kris.malfettone@sig.com</a>><br>
Cc: Kris Malfettone <<a href="mailto:kris.malfettone@sig.com">kris.malfettone@sig.com</a>>; cmake <<a href="mailto:cmake@cmake.org">cmake@cmake.org</a>><br>
Sent: Mon, Oct 14, 2013 9:30 pm<br>
Subject: Re: [CMake] Correct way to make an arbitrary file trigger a reconfigure...</span></p>
<div id="AOLMsgPart_2_a0d66b65-c85f-47c9-8aee-b0b10fccc560">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">Hi Kris,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">I have done that by following:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">1) use Ninja Generator;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">2) include empty "rerun.cmake" file, I put this file into binary dir, so I need a patch;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">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;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">4) add a custom commands that check the new files and touching "rerun.cmake" file;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">5) once "rerun.cmake" file is touched ninja will rerun cmake;</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">Best regards,</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">Sergey</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">—<br>
Sent from Mailbox for iPhone</span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">On Tue, Oct 15, 2013 at 7:02 AM, Malfettone, Kris <<a href="mailto:Kris.Malfettone@sig.com">Kris.Malfettone@sig.com</a>> wrote:</span></p>
</div>
<blockquote style="border:none; border-left:solid #CCCCCC 1.0pt; padding:0in 0in 0in 6.0pt; margin-left:4.8pt; margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D">Anyone?<br>
<br>
</span><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D"> </span><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"></span></p>
</div>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0in 0in 0in">
<div>
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">From:</span></b><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">
<a href="mailto:cmake-bounces@cmake.org">cmake-bounces@cmake.org</a> [<a href="mailto:cmake-bounces@cmake.org">mailto:cmake-bounces@cmake.org</a>]
<b>On Behalf Of </b>Malfettone, Kris<br>
<b>Sent:</b> Thursday, October 03, 2013 8:43 AM<br>
<b>To:</b> <a href="mailto:cmake@cmake.org">cmake@cmake.org</a><br>
<b>Subject:</b> [CMake] Correct way to make an arbitrary file trigger a reconfigure...</span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">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.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">For example:</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">configure_file( file_i_care_about.txt ${CMAKE_CURRENT_BINARY_DIR}/tmp_file_that_isn’t_used.txt )</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">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.</span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">-Kris</span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">
<hr size="2" width="100%" align="center">
</span></div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"><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></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black">
<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:10.0pt; font-family:"Arial","sans-serif"; color:black"></span></p>
</blockquote>
</div>
<p class="MsoNormal"><span style="font-size:10.0pt; font-family:"Arial","sans-serif"; color:black"> </span></p>
</div>
<div id="AOLMsgPart_3_a0d66b65-c85f-47c9-8aee-b0b10fccc560">
<pre style="background:white"><tt><span style="color:black">--</span></tt></pre>
<pre style="background:white"><tt><span style="color:black"> </span></tt></pre>
<pre style="background:white"><tt><span style="color:black">Powered by <a href="http://www.kitware.com">www.kitware.com</a></span></tt></pre>
<pre style="background:white"><tt><span style="color:black"> </span></tt></pre>
<pre style="background:white"><tt><span style="color:black">Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a></span></tt></pre>
<pre style="background:white"><tt><span style="color:black"> </span></tt></pre>
<pre style="background:white"><tt><span style="color:black">Kitware offers various services to support the CMake community. For more </span></tt></pre>
<pre style="background:white"><tt><span style="color:black">information on each offering, please visit:</span></tt></pre>
<pre style="background:white"><tt><span style="color:black"> </span></tt></pre>
<pre style="background:white"><tt><span style="color:black">CMake Support: <a href="http://cmake.org/cmake/help/support.html">http://cmake.org/cmake/help/support.html</a></span></tt></pre>
<pre style="background:white"><tt><span style="color:black">CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html">http://cmake.org/cmake/help/consulting.html</a></span></tt></pre>
<pre style="background:white"><tt><span style="color:black">CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html">http://cmake.org/cmake/help/training.html</a></span></tt></pre>
<pre style="background:white"><tt><span style="color:black"> </span></tt></pre>
<pre style="background:white"><tt><span style="color:black">Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span></tt></pre>
<pre style="background:white"><tt><span style="color:black"> </span></tt></pre>
<pre style="background:white"><tt><span style="color:black">Follow this link to subscribe/unsubscribe:</span></tt></pre>
<pre style="background:white"><tt><span style="color:black"><a href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></span></tt></pre>
</div>
</div>
</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>
</body>
</html>