[CMake] Adding cache entries to cmake gui

Nils Gladitz nilsgladitz at gmail.com
Mon Jan 30 07:44:36 EST 2017


On 01/30/2017 12:44 PM, Edward Diener wrote:

> Using the cmake gui program of the latest cmake 3.7.2 I add a cache 
> entry of CMAKE_CXX_FLAGS to some compile flag value, but as soon as I 
> hit the generate button the cache entry disappears and is no longer 
> retained. Is CMAKE_CXX_FLAGS no longer a valid cmake variable ? If it 
> is not a valid cmake variable, what cmake variable can I use to add a 
> cpp compiler flag to my cmake build ?
>

CMAKE_CXX_FLAGS is an advanced cache variable that should implicitly 
exist in a C++ project (it does not have to be added).
Advanced cache variables are hidden by default.
Did you check the "Advanced" option in cmake-gui?

Nils


More information about the CMake mailing list