I got confused in cached CMake variables:
Am I drawing conclusions correctly? Or do "default variables" like CMAKE_CXX_FLAGS behave differently?
Is there a way to have "myflags" written in the CMakeCache.txt file the first time CMake is started (when CMake has not previously been run in this folder)?
I would like to set "myflags" the first time CMake is run in the cache, and then allow the user to override it using the command line.
If I use FORCE , the user cannot override it through the command line.
If I do not use FORCE , "myflags" not written to the cache file during the first run.
source share