Build products in wrong location; WTF is SYMROOT?
Build products in wrong location; WTF is SYMROOT?
- Subject: Build products in wrong location; WTF is SYMROOT?
- From: Jens Alfke <email@hidden>
- Date: Wed, 16 May 2012 12:04:23 -0700
I’m trying to set up an automated build of an Xcode workspace. The buildbot (Jenkins) invokes xcodebuild, and the build succeeds, but I’m having trouble getting the build products to show up in the right place where the buildbot can find them. I expect them to be in a ‘build/Release’ subfolder of the project directory, but instead they end up way down in the DerivedData directory at a basically unguessable path.
This seems to be a project vs. workspace issue. If I build an individual Xcode project like so:
/usr/bin/xcodebuild -target TouchDB -configuration Release clean build
then the $SYMROOT variable is set to ‘TouchDB/build’ as documented, and $BUILT_PRODUCTS_DIR is ‘TouchDB/build/Release’.
But when I build the workspace, via
xcodebuild -workspace Syncpoint.xcworkspace -scheme 'Syncpoint Mac' -configuration Release build
then $SYMROOT is set to
/Users/snej/Library/Developer/Xcode/DerivedData/Syncpoint-foeclhgwzusgtkdptqnkqhlvbotp/Build/Products
and $BUILT_PRODUCTS_DIR is the ‘Release’ subdirectory of that path.
In neither target or project’s build settings do I override SYMROOT (aka “Build Products Path”). Nor have I customized the project/workspace settings for “Derived Data Location”. I tried setting my Xcode “Derived Data” location pref back to the default, but that didn’t help.
So I’m stumped. According to the docs, the only things that affect $SYMROOT are $SRCROOT (which is the path to the project file’s dir) and “Xcode Preferences > Build”, which I assume should be “Xcode Preferences > Locations”.
(And even more confusingly, if I build in the Xcode IDE, then $SYMROOT is *never* the build/ subdirectory, it’s *always* buried in ~/Library/.….DerivedData/.……)
Help?
—Jens
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden