#! /bin/sh ############################################################################# # $Id$ # Compiler: XCODE # Wrapper for xcodebuild. # See: https://jira.ncbi.nlm.nih.gov/browse/SYS-397163 # ############################################################################# if [ "x$1" = x-version ]; then exec /usr/bin/xcodebuild "$@" fi if [ "$USER" = tomcat -a ! -d /Users/tomcat -a -d /Users/buildAgent ]; then scheme=$(/usr/bin/xcodebuild "$@" -list | awk '/^ *Schemes:$/ { s=1; next } (s) { print $1; exit }') xcud=$scheme.xcodeproj/project.xcworkspace/xcuserdata/$USER.xcuserdatad xcs=$xcud/WorkspaceSettings.xcsettings if [ ! -f "$xcs" ]; then mkdir -p "$xcud" # Cribbed from https://gitlab.kitware.com/cmake/cmake/-/issues/20160. cat >"$xcs" < BuildLocationStyle UseTargetSettings CustomBuildLocationType RelativeToDerivedData DerivedDataCustomLocation DerivedData DerivedDataLocationStyle WorkspaceRelativePath IssueFilterStyle ShowActiveSchemeOnly LiveSourceIssuesEnabled EOF fi fi exec /usr/bin/xcodebuild "$@"