Jesse Beder
Jesse Beder

Reputation: 34054

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

I'm using CMake to generate an Xcode project, and I use

set_target_properties(myproj PROPERTIES XCODE_ATTRIBUTE_WHATEVER "some value")

to explicitly set a build setting. I'd like to only set it for a particular configuration, similar to using

set(CMAKE_CXX_FLAGS_MYCONFIG "-O2")

How can I do this?

Upvotes: 8

Views: 6845

Answers (1)

DLRdave
DLRdave

Reputation: 14280

This is not presently possible (as of CMake 2.8.4-rc2), but as of CMake 2.8.5, it will be possible:

XCODE_ATTRIBUTE_FOO[variant=Debug]

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

Monitor that issue in the bug tracker to be notified when it gets implemented.

Upvotes: 8

Related Questions