[CMake] COMPILE_FLAGS_<CONFIG>

Tyler Roscoe tyler at cryptio.net
Tue Oct 20 12:47:40 EDT 2009


Disregard my previous reply.

On Tue, Oct 20, 2009 at 09:28:19AM -0600, Steven Wilson wrote:
> I am asking why CMake doesn't support the following:
> 
> set_target_properties(${TARGET} PROPERTIES COMPILE_FLAGS_<CONFIG>
> "-fmyflag")

Ok, good question. It seems like a pretty compelling feature.

Maybe you can cheat and do something like this?:

set (CMAKE_CXX_FLAGS_DEBUG_BACKUP ${CMAKE_CXX_FLAGS_DEBUG})
set (CMAKE_CXX_FLAGS_DEBUG "-fmyflag")
add_library (...)
set (CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG_BACKUP})

tyler


More information about the CMake mailing list