View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012532CMakeCMakepublic2011-10-21 12:532013-10-07 10:09
ReporterDaniel Dekkers 
Assigned ToBrad King 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformApple MacOSOS XOS Version10.4.10
Product VersionCMake 2.8.6 
Target VersionCMake 2.8.12Fixed in VersionCMake 2.8.12 
Summary0012532: Defining different settings for different configurations in Xcode (4.0.2) generator
DescriptionSetting properties with the [variant=] construction in SET_TARGET_PROPERTIES() gives unexpected results.

Steps To ReproduceAs an example:

SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS[variant=Debug] "EntitlementsDebug.plist" )
SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS[variant=Release] "EntitlementsAdHoc.plist" )

Will fill both configurations (Debug and Release) with both settings (EntitlementsDebug.plist and EntitlementsAdHoc.plist).


Additional InformationThe [variant=] construction is undocumented, apart from the bug tracker.

Related to...

http://www.cmake.org/Bug/view.php?id=11667 [^]
http://www.cmake.org/Bug/view.php?id=8179 [^]
TagsNo tags attached.
Attached Files

 Relationships
has duplicate 0013201closedDavid Cole XCODE_ATTRIBUTE_<an attribute>[variant=Debug] does not work as expected 

  Notes
(0027972)
David Cole (manager)
2011-12-13 19:28

Unset target version field; too late for a fix to go into 2.8.7; deferred until a future version.
(0029990)
David Cole (manager)
2012-07-09 07:13

Unset target version field; too late for a fix to go into 2.8.9; deferred until a future version.
(0030616)
David Cole (manager)
2012-08-13 15:36

Sending old, not-recently-updated issues to the backlog.

(The age of the bug alone means that nobody is actively working on it...)

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it: http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer who has the bandwidth to take it on, and ferry a fix through to our 'next' branch for dashboard testing.
(0031221)
Ken (reporter)
2012-10-12 08:10

Any suggestions for a resolution or workaround for this? It is very frustrating having to manually tweak my project every time I run CMake.
(0031227)
Andrew S. (reporter)
2012-10-14 05:37
edited on: 2012-10-14 05:39

This bug is very annoying, but not really hard to fix.

'variant=Debug' is not working any more. I would suggest to use configuration postfixes (_DEBUG, _RELEASE, etc.) like you do for other CMake properties. See modified example below.

# Default property value for all configurations
SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS"EntitlementsAdHoc.plist")

# Change property for 'Debug' configuration only
SET_TARGET_PROPERTIES( ${APP_NAME} PROPERTIES XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS_DEBUG "EntitlementsDebug.plist")

(0031236)
Ken (reporter)
2012-10-15 09:46

Hi Andrew, this workaround does not work for me in Xcode 4.5.1. Here is the code that I'm using:

  set_target_properties (${NAME} PROPERTIES XCODE_ATTRIBUTE_COPY_PHASE_STRIP YES)
  set_target_properties (${NAME} PROPERTIES XCODE_ATTRIBUTE_COPY_PHASE_STRIP_DEBUG NO)

It simply created a User-Defined variable called COPY_PHASE_STRIP_DEBUG.
(0031238)
Andrew S. (reporter)
2012-10-15 10:05

Ken, this is not workaround. This is my suggestion how it could be fixed by CMake developers.
(0031827)
Cédric OCHS (reporter)
2012-12-04 10:39
edited on: 2012-12-12 10:42

Hi,

I'm also interested to support specific Xcode attributes for each configuration, so I wrote a patch :

http://kervala.net/download/cmake-xcode-attributes-variant.patch [^]

This patch is written against last Git revision.

I compiled CMake under Mac OS X and I checked the resulting Xcode project. All seems to be ok :)

I fixed a slight bug in my patch when using XCODE_ATTRIBUTE_ABC[variant=Debug][sdk=*]. It now adds an attribute ABC[sdk=*] only for Debug configuration and nothing for Release configuration.

(0031959)
Cédric OCHS (reporter)
2013-01-03 05:10

Please someone could check my patch and eventually apply it ?

Else I'll need to do a CMake fork which I prefer to avoid :(
(0033115)
Brad King (manager)
2013-05-22 15:52

Patch applied, thanks:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=332350b9 [^]
(0034056)
Robert Maynard (manager)
2013-10-07 10:09

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2011-10-21 12:53 Daniel Dekkers New Issue
2011-10-22 12:47 David Cole Target Version => CMake 2.8.7
2011-12-13 19:28 David Cole Note Added: 0027972
2011-12-13 19:28 David Cole Target Version CMake 2.8.7 =>
2012-01-07 09:59 David Cole Target Version => CMake 2.8.8
2012-04-19 08:37 David Cole Target Version CMake 2.8.8 => CMake 2.8.9
2012-05-05 13:38 David Cole Assigned To => David Cole
2012-05-05 13:38 David Cole Status new => assigned
2012-05-08 14:43 David Cole Relationship added has duplicate 0013201
2012-07-09 07:13 David Cole Note Added: 0029990
2012-07-09 07:20 David Cole Target Version CMake 2.8.9 =>
2012-08-13 15:36 David Cole Status assigned => backlog
2012-08-13 15:36 David Cole Note Added: 0030616
2012-08-13 15:37 David Cole Assigned To David Cole =>
2012-10-12 08:10 Ken Note Added: 0031221
2012-10-14 05:37 Andrew S. Note Added: 0031227
2012-10-14 05:39 Andrew S. Note Edited: 0031227
2012-10-15 09:46 Ken Note Added: 0031236
2012-10-15 10:05 Andrew S. Note Added: 0031238
2012-12-04 10:39 Cédric OCHS Note Added: 0031827
2012-12-04 10:40 Cédric OCHS Note Edited: 0031827
2012-12-04 12:08 Cédric OCHS Note Edited: 0031827
2012-12-04 12:55 Cédric OCHS Note Edited: 0031827
2012-12-12 10:42 Cédric OCHS Note Edited: 0031827
2013-01-03 05:10 Cédric OCHS Note Added: 0031959
2013-05-22 15:52 Brad King Note Added: 0033115
2013-05-22 15:52 Brad King Assigned To => Brad King
2013-05-22 15:52 Brad King Status backlog => resolved
2013-05-22 15:52 Brad King Resolution open => fixed
2013-05-22 15:52 Brad King Fixed in Version => CMake 2.8.12
2013-05-22 15:52 Brad King Target Version => CMake 2.8.12
2013-10-07 10:09 Robert Maynard Note Added: 0034056
2013-10-07 10:09 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team