From 246bd61ba160f5e7c11c90574d60fca440e8883f Mon Sep 17 00:00:00 2001 From: soroshsabz Date: Thu, 11 Apr 2019 12:02:03 +0430 Subject: Add -allowAppleClang option to bootstrap.sh. (fixes #4698) (#5915) * Add -allowAppleClang option to bootstrap.sh. (fixes #4698) * [vcpkg-bootstrap] Simplify appleclang changes and reformat * [vcpkg-bootstrap] Remove enviroment variable VCPKG_ALLOW_APPLE_CLANG --- scripts/bootstrap.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index 056b21cac..f0bfb9839 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -2,12 +2,15 @@ vcpkgDisableMetrics="OFF" vcpkgUseSystem=false +vcpkgAllowAppleClang=OFF for var in "$@" do if [ "$var" = "-disableMetrics" -o "$var" = "--disableMetrics" ]; then vcpkgDisableMetrics="ON" elif [ "$var" = "-useSystemBinaries" -o "$var" = "--useSystemBinaries" ]; then vcpkgUseSystem=true + elif [ "$var" = "-allowAppleClang" -o "$var" = "--allowAppleClang" ]; then + vcpkgAllowAppleClang=ON elif [ "$var" = "-help" -o "$var" = "--help" ]; then echo "Usage: ./bootstrap-vcpkg.sh [options]" echo @@ -15,6 +18,7 @@ do echo " -help Display usage help" echo " -disableMetrics Do not build metrics reporting into the executable" echo " -useSystemBinaries Force use of the system utilities for building vcpkg" + echo " -allowAppleClang Set VCPKG_ALLOW_APPLE_CLANG to build vcpkg in apple with clang anyway" exit 1 else echo "Unknown argument $var. Use '-help' for help." @@ -234,7 +238,7 @@ buildDir="$vcpkgRootDir/toolsrc/build.rel" rm -rf "$buildDir" mkdir -p "$buildDir" -(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics") || exit 1 +(cd "$buildDir" && CXX=$CXX "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DDEFINE_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1 (cd "$buildDir" && "$cmakeExe" --build .) || exit 1 rm -rf "$vcpkgRootDir/vcpkg" -- cgit v1.2.3