MantisBT - CMake
View Issue Details
0011667CMakeCMakepublic2011-01-06 16:492011-11-11 10:45
David Rogers 
David Cole 
normalfeaturealways
closedfixed 
CMake-2-8 
CMake 2.8.5CMake 2.8.5 
0011667: Xcode Generator: Support for Build Setting conditions.
For each build setting, different values can be given for different specified conditions.

For example: Using different LDFLAGS on i386 vs x86_64. In the project file it is stored like this:

"OTHER_LDFLAGS[sdk=iphoneos*][arch=armv7]" = "";

Each additional condition is added in another set of square brackets.
No tags attached.
related to 0008179closed David Cole Mac XCode generator: build type depend XCODE_ATTRIBUTE_* would be nice 
Issue History
2011-01-06 16:49David RogersNew Issue
2011-01-17 12:20David ColeNote Added: 0024771
2011-01-17 12:20David ColeAssigned To => David Cole
2011-01-17 12:20David ColeStatusnew => assigned
2011-01-19 03:20David RogersNote Added: 0024902
2011-02-09 14:29David ColeAssigned ToDavid Cole =>
2011-02-09 14:29David ColeAssigned To => David Cole
2011-02-09 14:29David ColeStatusassigned => backlog
2011-02-09 14:30David ColeAssigned ToDavid Cole =>
2011-04-09 11:52Johan BjörkNote Added: 0026160
2011-04-14 14:35David ColeAssigned To => David Cole
2011-04-14 14:35David ColeStatusbacklog => assigned
2011-04-14 14:35David ColeTarget Version => CMake 2.8.5
2011-06-05 14:38David ColeNote Added: 0026672
2011-06-05 14:38David ColeStatusassigned => resolved
2011-06-05 14:38David ColeFixed in Version => CMake 2.8.5
2011-06-05 14:38David ColeResolutionopen => fixed
2011-06-05 14:41David ColeRelationship addedrelated to 0008179
2011-11-11 10:45David ColeNote Added: 0027760
2011-11-11 10:45David ColeStatusresolved => closed

Notes
(0024771)
David Cole   
2011-01-17 12:20   
Do you have a concrete proposal for how you would like to see this "supported" from CMakeLists files?

Thanks.
(0024902)
David Rogers   
2011-01-19 03:20   
Not exactly. Just off the top of my head, perhaps something like this?

set_target_property(${TARGETNAME} PROPERTY XCODE_ATTRIBUTE_OTHER_LDFLAGS "-lm" CONDITIONS "sdk=iphoneos*" "arch=armv7")
(0026160)
Johan Björk   
2011-04-09 11:52   
This is fixed in CMake 'next'.
Syntax is
set_target_property(${TARGETNAME} PROPERTY XCODE_ATTRIBUTE_OTHER_LDFLAGS[sdk=iphoneos][arch=armv7] "-lm")
(0026672)
David Cole   
2011-06-05 14:38   
Fixed by this commit:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c519bb2bb60a95c8b9145af0d9c90900f5b48f3d [^]

Included in 2.8.5-rc1
(0027760)
David Cole   
2011-11-11 10:45   
Closing resolved issues that have not been updated in more than 4 months.