How to set the Xcode attribute in CMake for a specific configuration?

I use CMake to create an Xcode project, and I use

set_target_properties(myproj PROPERTIES XCODE_ATTRIBUTE_WHATEVER "some value") 

to explicitly set the build setting. I would like to install it only for a specific configuration, similar to using

 set(CMAKE_CXX_FLAGS_MYCONFIG "-O2") 

How can i do this?

+7
build-process xcode cmake configuration
source share
1 answer

This is currently not possible (as on CMake 2.8.4-rc2), but with CMake 2.8.5 this will be possible:

 XCODE_ATTRIBUTE_FOO[variant=Debug] 

For more information, see this feature request in the CMake bug tracker: http://www.cmake.org/Bug/view.php?id=8179

Track this issue in the bug tracker to receive notifications when it will be implemented.

+6
source share

All Articles