Agree on all points!<div><br></div><div>-Johan</div><div><br><div><br><div class="gmail_quote">On Wed, Aug 17, 2011 at 4:17 PM, Andreas Mohr <span dir="ltr">&lt;<a href="mailto:andi@lisas.de">andi@lisas.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">[cue maximally inflammatory subject ;)]<br>
<br>
Hi,<br>
<br>
I keep encountering template file processing where<br>
@VAR@ replacements end up empty due to the required template<br>
variable simply not having been set (or empty) [or renamed away].<br>
Doh.<br>
<br>
I&#39;d strongly vote for configure_file() to fail hard in such cases,<br>
_by default_.<br>
Build system life is already hard enough without all those nice<br>
&quot;features&quot; of incomplete/insufficient commands (especially in the<br>
packaging area I seem to keep hitting more holes<br>
than actual functionality :-P).<br>
<br>
So:<br>
- change configure_file() behaviour to fail a CMake configure run hard<br>
  in case of unavailable (_not_ &quot;empty&quot;) @var@ (and perhaps ${var}?),<br>
  and have this be the _default_ setting<br>
- add configure_file() flag to optionally _disable_ this hard failure<br>
  in case it&#39;s actually unwanted<br>
- add configure_file() flag to optionally enable hard failure for the<br>
  other case of existing yet empty variables, too<br>
- add policy around this new highly useful feature<br>
- hmm, but these things {w|sh}ould apply to both ${xx} and @xx@ - do we need<br>
  to have some configuration to tell behaviour apart?<br>
- anything I&#39;ve missed that should be added/changed for a more suitable<br>
  implementation?<br>
- add these things to a new bug# for implementation<br>
<br>
Done Deal?<br>
<br>
Thanks,<br>
<br>
Andreas Mohr<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</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>
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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div></div>