On Mon, Dec 1, 2008 at 3:39 PM, Bill Hoffman <span dir="ltr"><<a href="mailto:bill.hoffman@kitware.com">bill.hoffman@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;">
<div class="Ih2E3d">David Genest wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, <br>
In a Visual Studio Generator context... <br>
I set a compiler flag in my CMakeLists.txt, but the change is not<br>
reflected in the gui (advanced values), even if the project setting is<br>
correct. I find this error prone, because it gives the user incorrect<br>
information about the current configuration. Is this by design?<br>
<br>
Example code: <br>
Set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa")<br>
<br>
I would expect to see this change in the gui also. But now I see /EHsc.<br>
<br>
Thanks, <br>
</blockquote></div>
That is because you are setting the value in memory and not in the cache. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa" CACHE FORCE "") will do what you want. However, the user will NOT be able to edit from the gui if you do that. Because each time cmake is run the cache FORCE will change the values.</blockquote>
<div><br>Has a FORCE_ONCE option ever been considered? The idea would be to allow the user to (as a one time operation) to force a cache value on top of an already existing cache entry. It would be useful for appending options, for example.<br>
<br></div></div>-- <br>Philip Lowman<br>