diff options
| author | Billy O'Neal <bion@microsoft.com> | 2021-01-13 14:06:06 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-13 14:06:06 -0800 |
| commit | 8414e15973097e70fe40149e922c402799804b3d (patch) | |
| tree | ca46f3f317f0eef7924f3b76828868d51bb249cf /scripts/bootstrap.sh | |
| parent | 4da47f758fb5e02fc017047e014d15174b85a848 (diff) | |
| download | vcpkg-8414e15973097e70fe40149e922c402799804b3d.tar.gz vcpkg-8414e15973097e70fe40149e922c402799804b3d.zip | |
[vcpkg] Use a tag file rather than conditional compilation to permanently disable metrics. (#15470)
Diffstat (limited to 'scripts/bootstrap.sh')
| -rw-r--r-- | scripts/bootstrap.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index fa1a64622..ba76f4f63 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -280,13 +280,17 @@ 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" "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_DISABLE_METRICS=$vcpkgDisableMetrics" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1 +(cd "$buildDir" && CXX="$CXX" "$cmakeExe" .. -DCMAKE_BUILD_TYPE=Release -G "Ninja" "-DCMAKE_MAKE_PROGRAM=$ninjaExe" "-DBUILD_TESTING=$vcpkgBuildTests" "-DVCPKG_DEVELOPMENT_WARNINGS=OFF" "-DVCPKG_ALLOW_APPLE_CLANG=$vcpkgAllowAppleClang") || exit 1 (cd "$buildDir" && "$cmakeExe" --build .) || exit 1 rm -rf "$vcpkgRootDir/vcpkg" cp "$buildDir/vcpkg" "$vcpkgRootDir/" -if ! [ "$vcpkgDisableMetrics" = "ON" ]; then +if [ "$vcpkgDisableMetrics" = "ON" ]; then + touch "$vcpkgRootDir/vcpkg.disable-metrics" +elif ! [ -f "$vcpkgRootDir/vcpkg.disable-metrics" ]; then + # Note that we intentionally leave any existing vcpkg.disable-metrics; once a user has + # opted out they should stay opted out. cat <<EOF Telemetry --------- |
