MantisBT - CMake
View Issue Details
0008915CMakeCMakepublic2009-04-21 06:172011-02-08 14:29
Claus Höfele 
 
normalfeatureN/A
closedno change required 
CMake-2-6 
 
0008915: Missing feature to set Xcode specific build settings
Xcode has two ways to change build settings: one way is to use compiler flags (e.g. -fno-exceptions to disable C++ exceptions); another way is to use Xcode specific variables (e.g. GCC_ENABLE_CPP_EXCEPTIONS). Some settings, such as is the case for exceptions, have both a compiler switch and a build setting variable. Other settings can only be changed with variables (e.g. the compiler version (3.3/4.0/4.2) to build the project).

A previous mail by Bill Hoffman on the cmake mailing list mentioned CMAKE_OSX_ARCHITECTURES, which results in the build setting variable ARCHS being written into the Xcode project file. However, there doesn't seem to be a generic way to set a build setting variable.

I'd like to ask for a new feature that allows me to set any Xcode build setting variable. These settings are important because they control many aspects of the Xcode build process that can't be configured with compiler switches.
cmake 2.6-patch 3, Xcode 3.1.2, Mac OS X 10.5.6
Xcode Build Setting Reference:
http://developer.apple.com/documentation/DeveloperTools/Reference/XcodeBuildSettingRef/0-Introduction/introduction.html [^]
No tags attached.
related to 0009125closed David Cole Add support to set GCC Version and Deployment Target for XCode projects 
Issue History
2009-04-21 06:17Claus HöfeleNew Issue
2009-04-29 05:26Guido LorenzNote Added: 0016240
2009-05-04 05:08Claus HöfeleNote Added: 0016282
2009-09-14 15:11Bill HoffmanStatusnew => closed
2009-09-14 15:11Bill HoffmanResolutionopen => no change required
2011-02-08 14:29David ColeNote Added: 0025339
2011-02-08 14:29David ColeRelationship addedrelated to 0009125

Notes
(0016240)
Guido Lorenz   
2009-04-29 05:26   
You can modify Xcode settings using the XCODE_ATTRIBUTE_<an-attribute> property, e.g. set_target_properties(target PROPERTIES XCODE_ATTRIBUTE_GCC_ENABLE_CPP_EXCEPTIONS "NO"). You might have to set the corresponding compiler flag (if there is one), too, but I'm not sure about that. Is that the kind of feature you are requesting?

http://www.cmake.org/cmake/help/cmake2.6docs.html#prop_tgt:XCODE_ATTRIBUTE_an-attribute [^]
(0016282)
Claus Höfele   
2009-05-04 05:08   
Yes, this is what I'm looking for. Thanks for your help.

(I don't know how to close the issue. I think you will have to do that.)
(0025339)
David Cole   
2011-02-08 14:29   
In addition to the target property, see the top level variables beginning with CMAKE_XCODE_ATTRIBUTE_* as introduced by the fix for 0009125