However, be aware of two things if you do use FORCE:
If CMAKE_CXX_FLAGS_RELEASE already contains "-xHost" you will be
appending it *again* each time CMake is run in a given build tree...
So you may want some "if(NOT CMAKE_CXX_FLAGS_RELEASE MATCHES
"-xHost")" logic in there as well.
Also, using FO
On 07/23/2015 02:22 PM, Chuck Atkins wrote:
You can update the cache entry with the alternate signature for set:
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -xHost" CACHE
STRING "Flags used by the compiler during release builds." FORCE)
This would keep appending " -xHOST" to the va
> Is this the intended behavior?
Yes. The GUI is essentially an editor for the CMake cache. These
variables are persistent with global scope. As such, only the cache values
are reflected in the GUI. When you set the CMAKE_CXX_FLAGS_RELEASE with
this form of the set command, you are changing i
Dear CMake Community,
I would like to add an extra flag to CMAKE_CXX_FLAGS_RELEASE (-xHost
for Intel compilers), so in my CMakeLists.txt I add:
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -xHost" )
If I then run VERBOSE=1 make, I observe that the xHost flag is passed
to the compiler.