.bash_helpers.sh 921 B

1234567891011121314151617
  1. # Copyright (c) 2008-2022 the Urho3D project
  2. # License: MIT
  3. # Define helpers
  4. post_cmake() {
  5. if [ -e "$BUILD"/*.xcodeproj/project.pbxproj ] && perl -v >/dev/null 2>&1; then
  6. echo -- post_cmake: Fix generated Xcode project
  7. # Speed up build for Debug build configuration by building only active arch (currently this is not doable via CMake generator-expression as it only works for individual target instead of global)
  8. perl -i -pe 'BEGIN {$/=undef} s/(Debug \*\/ = {[^}]+?)SDKROOT/\1ONLY_ACTIVE_ARCH = YES; SDKROOT/s' "$BUILD"/*.xcodeproj/project.pbxproj
  9. # Speed up build for Debug build configuration by skipping dSYM file generation
  10. if [[ $IOS ]] || [[ $TVOS ]]; then
  11. perl -i -pe 'BEGIN {$/=undef} s/(Debug \*\/ = {[^}]+?)SDKROOT/\1DEBUG_INFORMATION_FORMAT = dwarf; SDKROOT/s' "$BUILD"/*.xcodeproj/project.pbxproj
  12. fi
  13. fi
  14. }
  15. # vi: set ts=4 sw=4 expandtab: