On Wed, Dec 10, 2008 at 3:53 PM, David Cole <span dir="ltr"><<a href="mailto:david.cole@kitware.com">david.cole@kitware.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why wouldn't having this:<div>// CMAKE_CXX_FLAGS = '@CMAKE_CXX_FLAGS@'<br><br></div><div>in the <a href="http://header.h.in" target="_blank">header.h.in</a> file at configure time solve the issue of recompiling if you change the compilation flags? If you change the flags, CMake will change header.h when it configures it...</div>
<div><br></div><div>Or this:<br></div><div>#if 0</div><div>CMAKE_CXX_FLAGS = '@CMAKE_CXX_FLAGS@'<br><div class="gmail_quote">#endif</div><div class="gmail_quote"><br></div><div class="gmail_quote">if you're worried about whether the flags contain something that might break a compiler if found on a comment line... (Like a \ at the end of the line...?)</div>
<div class="gmail_quote"><br></div><div class="gmail_quote">Am I missing something?</div></div></blockquote><div><br>That's a good suggestion except you wouldn't be able to do it with CMAKE_CXX_FLAGS, you'd have to coax the definitions out of CMake some other way because CMAKE_CXX_FLAGS doesn't contain the results of ADD_DEFINITIONS().<br>
<br>There is unfortunately another major drawback to this solution. If you don't already use a <config.h> include file in your software project, it's going to be a lot of work to switch.<br></div></div><br>
-- <br>Philip Lowman<br>