[CMake] cmake-gui(beta) does not show a change in CMAKE_CXX_FLAGS

Bill Hoffman bill.hoffman at kitware.com
Mon Dec 1 16:27:42 EST 2008


David Genest wrote:
> Bill, 
> 
>> cache. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa" CACHE FORCE "") 
>> will do what you want.  
> 
> I tried adding CACHE FORCE "", but I still see /EHsc in the ui.
> 
> ___________

My mistake...


http://www.cmake.org/cmake/help/cmake2.6docs.html#command:set

   set(<variable> <value> [[CACHE <type> <docstring> [FORCE]] | 
PARENT_SCOPE])

Should be:

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHa" CACHE STRING "cxx flags" 
FORCE)

This will still be odd for your users.  It will also append /EHa every 
time CMake is run...

-Bill



More information about the CMake mailing list