Is there a way to explicitly set the CMAKE_CXX_FLAGS for a particular
executable? That is, if I set CMAKE_CXX_FLAGS and then have a
add_executable line, then change CMAKE_CXX_FLAGS and then have another
add_executable, will the first set of CMAKE_CXX_FLAGS be applied to
the first executable and the second set of CMAKE_CXX_FLAGS be applied
to the second executable?

I guess my confusion is that I don't understand how CMake variables are cached.

Each time I modify the variable, should I do it using

SET(CMAKE_CXX_FLAGS "some flags")

or

SET(CMAKE_CXX_FLAGS "some flags" CACHE STRING "compiler flags")

?

In this example: http://codepad.org/PGJRBjss the messages are actually
not displayed at all, which is only adding to my confusion :)

Any comments on this?

Thanks,

David
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to