Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 601
Jesse Beder Avatar asked Aug 30 '09 18:08

Jesse Beder


1 Answers

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.

like image 75
DLRdave Avatar answered Oct 29 '22 01:10

DLRdave