Skip to content

Commit 0765cfc

Browse files
ychintono
authored andcommitted
Merge pull request macvim-dev#1391 from ychin/fix-xcode-project-warnings-parallel-deployment-target
Fix misc MacVim project warnings in Xcode
1 parent 3e131b4 commit 0765cfc

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

src/MacVim/MacVim.xcodeproj/project.pbxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -890,6 +890,7 @@
890890
29B97313FDCFA39411CA2CEA /* Project object */ = {
891891
isa = PBXProject;
892892
attributes = {
893+
BuildIndependentTargetsInParallel = YES;
893894
LastUpgradeCheck = 0710;
894895
};
895896
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "MacVim" */;

src/auto/configure

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4792,7 +4792,21 @@ rm -f core conftest.err conftest.$ac_objext \
47924792
conftest$ac_exeext conftest.$ac_ext
47934793
else
47944794
if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
4795-
macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([0-9]*\.[0-9]*\).*/\1/'`
4795+
# Deployment target not specified. We use the current OS' version. We
4796+
# only want to extract the main OS version but not the minor version for
4797+
# multiple reasons: it's more predictable if this is built from a CI to
4798+
# be deployed out (e.g. Homebrew), and sometimes deployment target
4799+
# that is too new will cause Xcode to complain (e.g. macOS is 13.2 while
4800+
# Xcode may only support up to 13.1)
4801+
macosx_major_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([0-9]*\)\.[0-9]*.*/\1/'`
4802+
macosx_minor_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^[0-9]*\.\([0-9]*\).*/\1/'`
4803+
if test "$macosx_major_version" = "10"; then
4804+
# Older versions look like 10.X.Y form where X is the main version.
4805+
macosx_deployment_target="$macosx_major_version.$macosx_minor_version"
4806+
else
4807+
# Since 11.0, We have X.Y.Z, where X is the main version.
4808+
macosx_deployment_target="$macosx_major_version.0"
4809+
fi
47964810
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target"
47974811
else
47984812
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"

src/configure.ac

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,21 @@ if test "$vim_cv_uname_output" = Darwin; then
298298
LDFLAGS="$save_ldflags" ])
299299
else
300300
if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
301-
macosx_deployment_target=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([[0-9]]*\.[[0-9]]*\).*/\1/'`
301+
# Deployment target not specified. We use the current OS' version. We
302+
# only want to extract the main OS version but not the minor version for
303+
# multiple reasons: it's more predictable if this is built from a CI to
304+
# be deployed out (e.g. Homebrew), and sometimes deployment target
305+
# that is too new will cause Xcode to complain (e.g. macOS is 13.2 while
306+
# Xcode may only support up to 13.1)
307+
macosx_major_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^\([[0-9]]*\)\.[[0-9]]*.*/\1/'`
308+
macosx_minor_version=`/usr/bin/sw_vers -productVersion|/usr/bin/sed -e 's/^[[0-9]]*\.\([[0-9]]*\).*/\1/'`
309+
if test "$macosx_major_version" = "10"; then
310+
# Older versions look like 10.X.Y form where X is the main version.
311+
macosx_deployment_target="$macosx_major_version.$macosx_minor_version"
312+
else
313+
# Since 11.0, We have X.Y.Z, where X is the main version.
314+
macosx_deployment_target="$macosx_major_version.0"
315+
fi
302316
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$macosx_deployment_target"
303317
else
304318
XCODEFLAGS="$XCODEFLAGS MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET"

0 commit comments

Comments
 (0)