[CMake] Removing default COMPILE_FLAGS

Tyler Roscoe tyler at cryptio.net
Tue Dec 1 18:05:06 EST 2009


On Tue, Dec 01, 2009 at 10:10:05PM +0000, Daniel Nelson wrote:
> flag.  Is it possible to remove a flag from the default CMAKE_CXX_FLAGS variable
> only for this target?  Or do I have to remove the flag from the default flags

I believe CMAKE_CXX_FLAGS is consulted each time an add_library() or
add_executable() call is processed. So you should be able to remove the
flag, add the singleton library/executable, and put the flag back.

tyler


More information about the CMake mailing list