<div dir="ltr"><div class="gmail_extra">Agreed that it is a bit heavyweight, but the stray files have resulted in some pretty cryptic issues in the past (targets linking against an old version of a library that got renamed etc...).</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Your idea sounds good... I'll give it a try.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks!</div><div class="gmail_extra">-=Abe</div>
<div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 14, 2014 at 8:55 AM, Bill Hoffman <span dir="ltr"><<a href="mailto:bill.hoffman@kitware.com" target="_blank">bill.hoffman@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 2/14/2014 11:00 AM, Abe Bachrach wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I'd only want to do a full build if one of the CMakeLists.txt has<br>
changed (cmake needs to get re-run). Otherwise, I'd like to do a normal<br>
build.<br>
</blockquote></div>
That seems a bit over kill to me. I would rather have a few extra files than having a complete clean done each time a new file is added or a flag is changed in a CMake file. Here is what you should do....<br>
<br>
1. create a list of all the targets in your project<br>
2. use configure file to save the list, but be tricky so that it saves the last version of the file as well.<br>
3. add a custom command that all your targets depend on. The custom command should depend on the file that is configured. It will get run only when the file changes if you use copy on different. When the custom command runs it should diff the two files and figure out what target went away, and then remove it.<br>
<br>
Basically, you should be able to do this all from the CMake language with custom commands and a CMake script.<span class="HOEnZb"><font color="#888888"><br>
<br>
-Bill</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/<u></u>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/<u></u>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/<u></u>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</div></div></blockquote></div><br></div></div>