View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012370CMakeCMakepublic2011-07-29 01:202012-02-06 06:07
Reportersimleb 
Assigned ToDavid Cole 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformMacOSOS XOS Version10.6-7
Product VersionCMake 2.8.5 
Target VersionCMake 2.8.6Fixed in VersionCMake 2.8.6 
Summary0012370: Space in MACOSX_BUNDLE target name yields PostBuild script error with Xcode generator
DescriptionWhen using a space in the target name of a MACOSX_BUNDLE (for an OS X app, it's pretty common, e.g. "App Store" or "Photo Booth"…) and generating a Xcode project, then in Xcode the build fails because the post build script tries to make the target PostBuild.Name\ with\ spaces.$CONFIGURATION of the XCODE_DEPEND_HELPER.make makefile and I guess make doesn't like it.
See the 'additional informations' for the actual output.

Setting MACOSX_BUNDLE_BUNDLE_NAME to "My App" doesn't help. A solution could be to produce an app named based on MACOSX_BUNDLE_BUNDLE_NAME instead of the target name, so you can use a target name like "MyApp" and still get a proper "My App.app" executable.


This issue is new to CMake 2.8.5 to the best of my knowledge.

Tested on both Xcode 3.2.5 on OS X 10.6 and Xcode 4.1 on OS X 10.7

Using the makefiles generator, there is no issue. I get "My App.app".
For Xcode, the temporary workaround is to skip the space in the target name (like "MyApp").
Steps To Reproduce1. add_executable("My App" MACOSX_BUNDLE …)

2. $ cmake . -G Xcode

3. Try to build in Xcode
Additional Informationecho "Depend check for xcode"
Depend check for xcode
cd /path/to/buildir && make -C /path/to/buildir -f /path/to/buildir/CMakeScripts/XCODE_DEPEND_HELPER.make PostBuild.My\ App.Debug
make[1]: *** No rule to make target `PostBuild.My App.Debug'. Stop.
make: *** [Demo] Error 2
Command /bin/sh failed with exit code 2
TagsXcode
Attached Filespatch file icon 0001-xcode-Fix-bug-12370.patch [^] (982 bytes) 2011-08-27 14:17 [Show Content]

 Relationships

  Notes
(0027276)
Johan Björk (reporter)
2011-08-27 14:18

Simple patch attached; don't use spaces in target names for the makefile generator.
(0027352)
David Cole (manager)
2011-09-05 13:24

Fix pushed to 'next'

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e05e0f1d2c63353e25675df5430e1cbcd909cf93 [^]
(0028491)
David Cole (manager)
2012-02-06 06:07

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

 Issue History
Date Modified Username Field Change
2011-07-29 01:20 simleb New Issue
2011-07-29 01:23 simleb Tag Attached: Xcode
2011-07-29 06:12 David Cole Assigned To => David Cole
2011-07-29 06:12 David Cole Status new => assigned
2011-08-27 14:17 Johan Björk File Added: 0001-xcode-Fix-bug-12370.patch
2011-08-27 14:18 Johan Björk Note Added: 0027276
2011-08-31 11:10 David Cole Target Version => CMake 2.8.6
2011-09-05 13:24 David Cole Note Added: 0027352
2011-09-05 13:24 David Cole Status assigned => resolved
2011-09-05 13:24 David Cole Fixed in Version => CMake 2.8.6
2011-09-05 13:24 David Cole Resolution open => fixed
2012-02-06 06:07 David Cole Note Added: 0028491
2012-02-06 06:07 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team