<p dir="ltr">Well, if the file needs to have the substitutions performed, like after an edit, CMake will have to run. What you could do is write a standalone cmake script that just does the configure file step, then add it as a custom command on a custom target, just running that configure script in script mode and passing the needed variables on the command line. Then, a change in your python file won't trigger a full cmake configure: it will just run the small cmake script that essentially exists to apply the variable substitutions.</p>
<p dir="ltr">Ryan</p>
<br><div class="gmail_quote">On Fri, Apr 17, 2015, 4:00 PM Neil Carlson <<a href="mailto:neil.n.carlson@gmail.com">neil.n.carlson@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm working within a very large project on a python script.  The script gets passed through configure_file to replace some @VAR@ strings with some file paths that are defined when cmake is run; this generates the final script.  The side effect is that whenever I modify the file and run make, it re-runs cmake to regenerate the build system, and that cascades into all sorts of other things that are completely orthogonal to the script being rebuilt.  Is there some more appropriate alternative to configure_file that should be used instead?   Thanks for your expert advice!</div>
--<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/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/support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/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/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/cmake" target="_blank">http://public.kitware.com/mailman/listinfo/cmake</a></blockquote></div>