From aa60b7efa56a83ead743718941d8b320ef4a05af Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Thu, 4 Feb 2021 10:15:44 -0800 Subject: [PATCH] [vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. (#15474) This reduces bootstrap cost for Windows customers, resolving the issue initially submitted as #12502 . The `toolsrc` tree was extracted to https://github.com/microsoft/vcpkg-tool. `bootstrap.sh` was changed to download the right source tarball, extract, and build it. This was chosen over the previous attempt, a submodule, over concerns of accidentally destroying people's local modifications. --- .gitignore | 9 - docs/about/privacy.md | 2 +- docs/tool-maintainers/benchmarking.md | 195 - docs/tool-maintainers/layout.md | 74 - docs/tool-maintainers/testing.md | 152 - scripts/Generate-SpdxLicenseList.ps1 | 63 - ...reate-FormatDiff.ps1 => Create-PRDiff.ps1} | 0 scripts/azure-pipelines/Format-CxxCode.ps1 | 50 - scripts/azure-pipelines/azure-pipelines.yml | 14 +- .../backcompat-helpers.ps1 | 24 - .../end-to-end-tests-dir/binarycaching.ps1 | 86 - .../end-to-end-tests-dir/build-missing.ps1 | 18 - .../end-to-end-tests-dir/cli.ps1 | 11 - .../end-to-end-tests-dir/create.ps1 | 10 - .../end-to-end-tests-dir/disable-metrics.ps1 | 67 - .../end-to-end-tests-dir/env-passthrough.ps1 | 21 - .../integrate-install.ps1 | 28 - .../end-to-end-tests-dir/registries.ps1 | 192 - .../end-to-end-tests-dir/spaces.ps1 | 11 - .../vcpkg-minimum-required.ps1 | 22 - .../end-to-end-tests-dir/versions.ps1 | 98 - .../end-to-end-tests-prelude.ps1 | 80 - scripts/azure-pipelines/end-to-end-tests.ps1 | 55 - .../azure-pipelines/linux/azure-pipelines.yml | 13 +- .../azure-pipelines/osx/azure-pipelines.yml | 11 - scripts/azure-pipelines/signing.yml | 125 - .../windows/azure-pipelines.yml | 29 +- .../azure-pipelines/windows/packages.config | 4 - .../azure-pipelines/windows/signing.signproj | 39 - scripts/bootstrap.ps1 | 413 +- scripts/bootstrap.sh | 26 +- scripts/cleanEnvironmentHelper.ps1 | 52 - .../portfile.cmake | 2 - .../vcpkg-requires-current-date/vcpkg.json | 6 - .../vcpkg-requires-future-date/portfile.cmake | 2 - .../vcpkg-requires-future-date/vcpkg.json | 6 - .../vcpkg-requires-old-date/portfile.cmake | 2 - .../vcpkg-requires-old-date/vcpkg.json | 6 - .../vcpkg-uses-test-cmake/portfile.cmake | 3 - .../overlays/vcpkg-uses-test-cmake/vcpkg.json | 6 - .../portfile.cmake | 3 - .../vcpkg.json | 6 - .../portfile.cmake | 1 - .../vcpkg-internal-e2e-test-port/vcpkg.json | 4 - scripts/e2e_ports/versions/baseline.json | 5 - .../v-/vcpkg-internal-e2e-test-port.json | 8 - .../testing/env-passthrough/passthrough.cmake | 6 - .../testing/integrate-install/NoProps.vcxproj | 145 - .../integrate-install/Project1.vcxproj | 146 - scripts/testing/integrate-install/Source.cpp | 6 - .../integrate-install/VcpkgTriplet.vcxproj | 151 - .../integrate-install/VcpkgTriplet2.vcxproj | 149 - .../integrate-install/VcpkgUseStatic.vcxproj | 151 - .../integrate-install/VcpkgUseStatic2.vcxproj | 149 - scripts/tls12-download.exe | Bin 0 -> 18312 bytes toolsrc/.clang-format | 54 - toolsrc/CMakeLists.txt | 222 - toolsrc/cmake/utilities.cmake | 250 - toolsrc/include/catch2/catch.hpp | 16865 ---------------- toolsrc/include/pch.h | 55 - .../include/vcpkg-test/mockcmakevarprovider.h | 42 - toolsrc/include/vcpkg-test/util.h | 132 - toolsrc/include/vcpkg/archives.h | 10 - toolsrc/include/vcpkg/base/basic_checks.h | 41 - toolsrc/include/vcpkg/base/cache.h | 21 - toolsrc/include/vcpkg/base/checks.h | 60 - toolsrc/include/vcpkg/base/chrono.h | 75 - toolsrc/include/vcpkg/base/cofffilereader.h | 25 - toolsrc/include/vcpkg/base/cstringview.h | 60 - toolsrc/include/vcpkg/base/delayed_init.h | 29 - toolsrc/include/vcpkg/base/downloads.h | 41 - toolsrc/include/vcpkg/base/enums.h | 11 - toolsrc/include/vcpkg/base/expected.h | 245 - toolsrc/include/vcpkg/base/files.h | 315 - toolsrc/include/vcpkg/base/fwd/json.h | 10 - toolsrc/include/vcpkg/base/fwd/lockguarded.h | 10 - toolsrc/include/vcpkg/base/fwd/optional.h | 7 - toolsrc/include/vcpkg/base/fwd/span.h | 10 - toolsrc/include/vcpkg/base/fwd/stringview.h | 6 - toolsrc/include/vcpkg/base/graphs.h | 113 - toolsrc/include/vcpkg/base/hash.h | 52 - toolsrc/include/vcpkg/base/ignore_errors.h | 10 - toolsrc/include/vcpkg/base/json.h | 302 - toolsrc/include/vcpkg/base/jsonreader.h | 367 - toolsrc/include/vcpkg/base/lazy.h | 26 - toolsrc/include/vcpkg/base/lineinfo.h | 13 - toolsrc/include/vcpkg/base/lockguarded.h | 35 - toolsrc/include/vcpkg/base/machinetype.h | 37 - toolsrc/include/vcpkg/base/optional.h | 382 - toolsrc/include/vcpkg/base/parse.h | 129 - toolsrc/include/vcpkg/base/pragmas.h | 35 - toolsrc/include/vcpkg/base/sortedvector.h | 52 - toolsrc/include/vcpkg/base/span.h | 55 - toolsrc/include/vcpkg/base/stringliteral.h | 18 - toolsrc/include/vcpkg/base/strings.h | 306 - toolsrc/include/vcpkg/base/stringview.h | 55 - toolsrc/include/vcpkg/base/system.debug.h | 45 - toolsrc/include/vcpkg/base/system.h | 50 - toolsrc/include/vcpkg/base/system.print.h | 67 - toolsrc/include/vcpkg/base/system.process.h | 144 - toolsrc/include/vcpkg/base/system_headers.h | 40 - toolsrc/include/vcpkg/base/uint128.h | 24 - toolsrc/include/vcpkg/base/unicode.h | 148 - toolsrc/include/vcpkg/base/util.h | 248 - toolsrc/include/vcpkg/base/view.h | 3 - toolsrc/include/vcpkg/base/xmlserializer.h | 31 - toolsrc/include/vcpkg/base/zstringview.h | 52 - toolsrc/include/vcpkg/binarycaching.h | 62 - toolsrc/include/vcpkg/binarycaching.private.h | 51 - toolsrc/include/vcpkg/binaryparagraph.h | 55 - toolsrc/include/vcpkg/build.h | 389 - toolsrc/include/vcpkg/buildenvironment.h | 15 - toolsrc/include/vcpkg/cmakevars.h | 38 - toolsrc/include/vcpkg/commands.add-version.h | 13 - toolsrc/include/vcpkg/commands.autocomplete.h | 13 - .../include/vcpkg/commands.buildexternal.h | 15 - toolsrc/include/vcpkg/commands.cache.h | 13 - toolsrc/include/vcpkg/commands.ci.h | 16 - toolsrc/include/vcpkg/commands.ciclean.h | 13 - .../include/vcpkg/commands.civerifyversions.h | 13 - toolsrc/include/vcpkg/commands.contact.h | 15 - toolsrc/include/vcpkg/commands.create.h | 15 - toolsrc/include/vcpkg/commands.dependinfo.h | 16 - toolsrc/include/vcpkg/commands.edit.h | 14 - toolsrc/include/vcpkg/commands.env.h | 16 - toolsrc/include/vcpkg/commands.fetch.h | 13 - .../include/vcpkg/commands.format-manifest.h | 14 - toolsrc/include/vcpkg/commands.h | 32 - toolsrc/include/vcpkg/commands.hash.h | 13 - toolsrc/include/vcpkg/commands.info.h | 13 - toolsrc/include/vcpkg/commands.integrate.h | 17 - toolsrc/include/vcpkg/commands.interface.h | 37 - toolsrc/include/vcpkg/commands.list.h | 14 - toolsrc/include/vcpkg/commands.owns.h | 15 - toolsrc/include/vcpkg/commands.porthistory.h | 13 - toolsrc/include/vcpkg/commands.portsdiff.h | 13 - toolsrc/include/vcpkg/commands.search.h | 15 - toolsrc/include/vcpkg/commands.setinstalled.h | 26 - toolsrc/include/vcpkg/commands.upgrade.h | 16 - .../include/vcpkg/commands.upload-metrics.h | 12 - toolsrc/include/vcpkg/commands.version.h | 15 - toolsrc/include/vcpkg/commands.xvsinstances.h | 14 - toolsrc/include/vcpkg/configuration.h | 25 - toolsrc/include/vcpkg/dependencies.h | 188 - toolsrc/include/vcpkg/export.chocolatey.h | 20 - toolsrc/include/vcpkg/export.h | 19 - toolsrc/include/vcpkg/export.ifw.h | 25 - toolsrc/include/vcpkg/export.prefab.h | 79 - toolsrc/include/vcpkg/fwd/build.h | 7 - toolsrc/include/vcpkg/fwd/cmakevars.h | 6 - toolsrc/include/vcpkg/fwd/configuration.h | 6 - toolsrc/include/vcpkg/fwd/dependencies.h | 7 - toolsrc/include/vcpkg/fwd/packagespec.h | 6 - toolsrc/include/vcpkg/fwd/portfileprovider.h | 10 - toolsrc/include/vcpkg/fwd/registries.h | 9 - toolsrc/include/vcpkg/fwd/vcpkgcmdarguments.h | 14 - toolsrc/include/vcpkg/fwd/vcpkgpaths.h | 8 - toolsrc/include/vcpkg/globalstate.h | 21 - toolsrc/include/vcpkg/help.h | 19 - toolsrc/include/vcpkg/input.h | 15 - toolsrc/include/vcpkg/install.h | 116 - toolsrc/include/vcpkg/metrics.h | 33 - toolsrc/include/vcpkg/packagespec.h | 226 - toolsrc/include/vcpkg/paragraphparser.h | 68 - toolsrc/include/vcpkg/paragraphs.h | 60 - toolsrc/include/vcpkg/platform-expression.h | 82 - toolsrc/include/vcpkg/portfileprovider.h | 70 - .../include/vcpkg/postbuildlint.buildtype.h | 65 - toolsrc/include/vcpkg/postbuildlint.h | 20 - toolsrc/include/vcpkg/registries.h | 111 - toolsrc/include/vcpkg/remove.h | 34 - toolsrc/include/vcpkg/sourceparagraph.h | 156 - toolsrc/include/vcpkg/statusparagraph.h | 68 - toolsrc/include/vcpkg/statusparagraphs.h | 82 - toolsrc/include/vcpkg/textrowcol.h | 17 - toolsrc/include/vcpkg/tools.h | 37 - toolsrc/include/vcpkg/triplet.h | 50 - toolsrc/include/vcpkg/update.h | 35 - toolsrc/include/vcpkg/userconfig.h | 23 - toolsrc/include/vcpkg/vcpkgcmdarguments.h | 236 - toolsrc/include/vcpkg/vcpkglib.h | 26 - toolsrc/include/vcpkg/vcpkgpaths.h | 178 - toolsrc/include/vcpkg/versiondeserializers.h | 41 - toolsrc/include/vcpkg/versions.h | 87 - toolsrc/include/vcpkg/versiont.h | 44 - toolsrc/include/vcpkg/visualstudio.h | 14 - toolsrc/src/pch.cpp | 2 - toolsrc/src/tls12-download.c | 311 - toolsrc/src/vcpkg-fuzz/main.cpp | 194 - toolsrc/src/vcpkg-test/arguments.cpp | 135 - toolsrc/src/vcpkg-test/binarycaching.cpp | 290 - toolsrc/src/vcpkg-test/binaryconfigparser.cpp | 336 - toolsrc/src/vcpkg-test/catch.cpp | 12 - toolsrc/src/vcpkg-test/chrono.cpp | 34 - toolsrc/src/vcpkg-test/commands.cpp | 83 - toolsrc/src/vcpkg-test/dependencies.cpp | 1713 -- toolsrc/src/vcpkg-test/downloads.cpp | 59 - toolsrc/src/vcpkg-test/files.cpp | 406 - toolsrc/src/vcpkg-test/hash.cpp | 276 - toolsrc/src/vcpkg-test/json.cpp | 241 - .../vcpkg-test/large-json-document.json.inc | 516 - toolsrc/src/vcpkg-test/manifests.cpp | 733 - .../src/vcpkg-test/mockcmakevarsprovider.cpp | 28 - toolsrc/src/vcpkg-test/optional.cpp | 121 - toolsrc/src/vcpkg-test/paragraph.cpp | 516 - toolsrc/src/vcpkg-test/plan.cpp | 1297 -- .../src/vcpkg-test/platform-expression.cpp | 80 - toolsrc/src/vcpkg-test/registries.cpp | 132 - toolsrc/src/vcpkg-test/specifier.cpp | 130 - toolsrc/src/vcpkg-test/statusparagraphs.cpp | 116 - toolsrc/src/vcpkg-test/strings.cpp | 114 - toolsrc/src/vcpkg-test/stringview.cpp | 19 - toolsrc/src/vcpkg-test/system.cpp | 149 - toolsrc/src/vcpkg-test/uint128.cpp | 68 - toolsrc/src/vcpkg-test/update.cpp | 105 - toolsrc/src/vcpkg-test/util.cpp | 230 - toolsrc/src/vcpkg-test/versionplan.cpp | 152 - toolsrc/src/vcpkg.cpp | 313 - toolsrc/src/vcpkg/archives.cpp | 130 - toolsrc/src/vcpkg/base/checks.cpp | 120 - toolsrc/src/vcpkg/base/chrono.cpp | 180 - toolsrc/src/vcpkg/base/cofffilereader.cpp | 311 - toolsrc/src/vcpkg/base/downloads.cpp | 467 - toolsrc/src/vcpkg/base/enums.cpp | 12 - toolsrc/src/vcpkg/base/files.cpp | 1595 -- toolsrc/src/vcpkg/base/hash.cpp | 703 - toolsrc/src/vcpkg/base/json.cpp | 1411 -- toolsrc/src/vcpkg/base/machinetype.cpp | 39 - toolsrc/src/vcpkg/base/parse.cpp | 110 - toolsrc/src/vcpkg/base/strings.cpp | 381 - toolsrc/src/vcpkg/base/stringview.cpp | 45 - toolsrc/src/vcpkg/base/system.cpp | 343 - toolsrc/src/vcpkg/base/system.print.cpp | 30 - toolsrc/src/vcpkg/base/system.process.cpp | 793 - toolsrc/src/vcpkg/base/uint128.cpp | 66 - toolsrc/src/vcpkg/base/unicode.cpp | 282 - toolsrc/src/vcpkg/base/xmlserializer.cpp | 113 - toolsrc/src/vcpkg/binarycaching.cpp | 1477 -- toolsrc/src/vcpkg/binaryparagraph.cpp | 312 - toolsrc/src/vcpkg/build.cpp | 1491 -- toolsrc/src/vcpkg/buildenvironment.cpp | 20 - toolsrc/src/vcpkg/cmakevars.cpp | 323 - toolsrc/src/vcpkg/commands.add-version.cpp | 416 - toolsrc/src/vcpkg/commands.autocomplete.cpp | 185 - toolsrc/src/vcpkg/commands.buildexternal.cpp | 54 - toolsrc/src/vcpkg/commands.cache.cpp | 79 - toolsrc/src/vcpkg/commands.ci.cpp | 606 - toolsrc/src/vcpkg/commands.ciclean.cpp | 46 - .../src/vcpkg/commands.civerifyversions.cpp | 418 - toolsrc/src/vcpkg/commands.contact.cpp | 66 - toolsrc/src/vcpkg/commands.cpp | 134 - toolsrc/src/vcpkg/commands.create.cpp | 70 - toolsrc/src/vcpkg/commands.dependinfo.cpp | 339 - toolsrc/src/vcpkg/commands.edit.cpp | 278 - toolsrc/src/vcpkg/commands.env.cpp | 122 - toolsrc/src/vcpkg/commands.fetch.cpp | 30 - .../src/vcpkg/commands.format-manifest.cpp | 291 - toolsrc/src/vcpkg/commands.hash.cpp | 41 - toolsrc/src/vcpkg/commands.info.cpp | 147 - toolsrc/src/vcpkg/commands.integrate.cpp | 607 - toolsrc/src/vcpkg/commands.list.cpp | 147 - toolsrc/src/vcpkg/commands.owns.cpp | 47 - toolsrc/src/vcpkg/commands.porthistory.cpp | 240 - toolsrc/src/vcpkg/commands.portsdiff.cpp | 200 - toolsrc/src/vcpkg/commands.search.cpp | 184 - toolsrc/src/vcpkg/commands.setinstalled.cpp | 176 - toolsrc/src/vcpkg/commands.upgrade.cpp | 210 - toolsrc/src/vcpkg/commands.upload-metrics.cpp | 29 - toolsrc/src/vcpkg/commands.version.cpp | 60 - toolsrc/src/vcpkg/commands.xvsinstances.cpp | 41 - toolsrc/src/vcpkg/configuration.cpp | 84 - toolsrc/src/vcpkg/dependencies.cpp | 1896 -- toolsrc/src/vcpkg/export.chocolatey.cpp | 233 - toolsrc/src/vcpkg/export.cpp | 707 - toolsrc/src/vcpkg/export.ifw.cpp | 517 - toolsrc/src/vcpkg/export.prefab.cpp | 719 - toolsrc/src/vcpkg/globalstate.cpp | 13 - toolsrc/src/vcpkg/help.cpp | 205 - toolsrc/src/vcpkg/input.cpp | 56 - toolsrc/src/vcpkg/install.cpp | 1105 - toolsrc/src/vcpkg/metrics.cpp | 501 - toolsrc/src/vcpkg/packagespec.cpp | 291 - toolsrc/src/vcpkg/paragraphs.cpp | 531 - toolsrc/src/vcpkg/platform-expression.cpp | 577 - toolsrc/src/vcpkg/portfileprovider.cpp | 390 - toolsrc/src/vcpkg/postbuildlint.buildtype.cpp | 71 - toolsrc/src/vcpkg/postbuildlint.cpp | 981 - toolsrc/src/vcpkg/registries.cpp | 1204 -- toolsrc/src/vcpkg/remove.cpp | 337 - toolsrc/src/vcpkg/sourceparagraph.cpp | 1389 -- toolsrc/src/vcpkg/spdx-exceptions.inc | 45 - toolsrc/src/vcpkg/spdx-licenses.inc | 426 - toolsrc/src/vcpkg/statusparagraph.cpp | 121 - toolsrc/src/vcpkg/statusparagraphs.cpp | 186 - toolsrc/src/vcpkg/tools.cpp | 615 - toolsrc/src/vcpkg/triplet.cpp | 110 - toolsrc/src/vcpkg/update.cpp | 103 - toolsrc/src/vcpkg/userconfig.cpp | 77 - toolsrc/src/vcpkg/vcpkgcmdarguments.cpp | 960 - toolsrc/src/vcpkg/vcpkglib.cpp | 239 - toolsrc/src/vcpkg/vcpkgpaths.cpp | 1086 - toolsrc/src/vcpkg/versiondeserializers.cpp | 202 - toolsrc/src/vcpkg/versions.cpp | 247 - toolsrc/src/vcpkg/versiont.cpp | 48 - toolsrc/src/vcpkg/visualstudio.cpp | 381 - toolsrc/vcpkg.natvis | 35 - toolsrc/windows-bootstrap/vcpkg.vcxproj | 374 - 307 files changed, 53 insertions(+), 69866 deletions(-) delete mode 100644 docs/tool-maintainers/benchmarking.md delete mode 100644 docs/tool-maintainers/layout.md delete mode 100644 docs/tool-maintainers/testing.md delete mode 100644 scripts/Generate-SpdxLicenseList.ps1 rename scripts/azure-pipelines/{Create-FormatDiff.ps1 => Create-PRDiff.ps1} (100%) delete mode 100644 scripts/azure-pipelines/Format-CxxCode.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/cli.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/create.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/disable-metrics.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/integrate-install.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/registries.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/spaces.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-dir/versions.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests-prelude.ps1 delete mode 100644 scripts/azure-pipelines/end-to-end-tests.ps1 delete mode 100644 scripts/azure-pipelines/signing.yml delete mode 100644 scripts/azure-pipelines/windows/packages.config delete mode 100644 scripts/azure-pipelines/windows/signing.signproj delete mode 100644 scripts/cleanEnvironmentHelper.ps1 delete mode 100644 scripts/e2e_ports/overlays/vcpkg-requires-current-date/portfile.cmake delete mode 100644 scripts/e2e_ports/overlays/vcpkg-requires-current-date/vcpkg.json delete mode 100644 scripts/e2e_ports/overlays/vcpkg-requires-future-date/portfile.cmake delete mode 100644 scripts/e2e_ports/overlays/vcpkg-requires-future-date/vcpkg.json delete mode 100644 scripts/e2e_ports/overlays/vcpkg-requires-old-date/portfile.cmake delete mode 100644 scripts/e2e_ports/overlays/vcpkg-requires-old-date/vcpkg.json delete mode 100644 scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/portfile.cmake delete mode 100644 scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/vcpkg.json delete mode 100644 scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/portfile.cmake delete mode 100644 scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/vcpkg.json delete mode 100644 scripts/e2e_ports/vcpkg-internal-e2e-test-port/portfile.cmake delete mode 100644 scripts/e2e_ports/vcpkg-internal-e2e-test-port/vcpkg.json delete mode 100644 scripts/e2e_ports/versions/baseline.json delete mode 100644 scripts/e2e_ports/versions/v-/vcpkg-internal-e2e-test-port.json delete mode 100644 scripts/testing/env-passthrough/passthrough.cmake delete mode 100644 scripts/testing/integrate-install/NoProps.vcxproj delete mode 100644 scripts/testing/integrate-install/Project1.vcxproj delete mode 100644 scripts/testing/integrate-install/Source.cpp delete mode 100644 scripts/testing/integrate-install/VcpkgTriplet.vcxproj delete mode 100644 scripts/testing/integrate-install/VcpkgTriplet2.vcxproj delete mode 100644 scripts/testing/integrate-install/VcpkgUseStatic.vcxproj delete mode 100644 scripts/testing/integrate-install/VcpkgUseStatic2.vcxproj create mode 100644 scripts/tls12-download.exe delete mode 100644 toolsrc/.clang-format delete mode 100644 toolsrc/CMakeLists.txt delete mode 100644 toolsrc/cmake/utilities.cmake delete mode 100644 toolsrc/include/catch2/catch.hpp delete mode 100644 toolsrc/include/pch.h delete mode 100644 toolsrc/include/vcpkg-test/mockcmakevarprovider.h delete mode 100644 toolsrc/include/vcpkg-test/util.h delete mode 100644 toolsrc/include/vcpkg/archives.h delete mode 100644 toolsrc/include/vcpkg/base/basic_checks.h delete mode 100644 toolsrc/include/vcpkg/base/cache.h delete mode 100644 toolsrc/include/vcpkg/base/checks.h delete mode 100644 toolsrc/include/vcpkg/base/chrono.h delete mode 100644 toolsrc/include/vcpkg/base/cofffilereader.h delete mode 100644 toolsrc/include/vcpkg/base/cstringview.h delete mode 100644 toolsrc/include/vcpkg/base/delayed_init.h delete mode 100644 toolsrc/include/vcpkg/base/downloads.h delete mode 100644 toolsrc/include/vcpkg/base/enums.h delete mode 100644 toolsrc/include/vcpkg/base/expected.h delete mode 100644 toolsrc/include/vcpkg/base/files.h delete mode 100644 toolsrc/include/vcpkg/base/fwd/json.h delete mode 100644 toolsrc/include/vcpkg/base/fwd/lockguarded.h delete mode 100644 toolsrc/include/vcpkg/base/fwd/optional.h delete mode 100644 toolsrc/include/vcpkg/base/fwd/span.h delete mode 100644 toolsrc/include/vcpkg/base/fwd/stringview.h delete mode 100644 toolsrc/include/vcpkg/base/graphs.h delete mode 100644 toolsrc/include/vcpkg/base/hash.h delete mode 100644 toolsrc/include/vcpkg/base/ignore_errors.h delete mode 100644 toolsrc/include/vcpkg/base/json.h delete mode 100644 toolsrc/include/vcpkg/base/jsonreader.h delete mode 100644 toolsrc/include/vcpkg/base/lazy.h delete mode 100644 toolsrc/include/vcpkg/base/lineinfo.h delete mode 100644 toolsrc/include/vcpkg/base/lockguarded.h delete mode 100644 toolsrc/include/vcpkg/base/machinetype.h delete mode 100644 toolsrc/include/vcpkg/base/optional.h delete mode 100644 toolsrc/include/vcpkg/base/parse.h delete mode 100644 toolsrc/include/vcpkg/base/pragmas.h delete mode 100644 toolsrc/include/vcpkg/base/sortedvector.h delete mode 100644 toolsrc/include/vcpkg/base/span.h delete mode 100644 toolsrc/include/vcpkg/base/stringliteral.h delete mode 100644 toolsrc/include/vcpkg/base/strings.h delete mode 100644 toolsrc/include/vcpkg/base/stringview.h delete mode 100644 toolsrc/include/vcpkg/base/system.debug.h delete mode 100644 toolsrc/include/vcpkg/base/system.h delete mode 100644 toolsrc/include/vcpkg/base/system.print.h delete mode 100644 toolsrc/include/vcpkg/base/system.process.h delete mode 100644 toolsrc/include/vcpkg/base/system_headers.h delete mode 100644 toolsrc/include/vcpkg/base/uint128.h delete mode 100644 toolsrc/include/vcpkg/base/unicode.h delete mode 100644 toolsrc/include/vcpkg/base/util.h delete mode 100644 toolsrc/include/vcpkg/base/view.h delete mode 100644 toolsrc/include/vcpkg/base/xmlserializer.h delete mode 100644 toolsrc/include/vcpkg/base/zstringview.h delete mode 100644 toolsrc/include/vcpkg/binarycaching.h delete mode 100644 toolsrc/include/vcpkg/binarycaching.private.h delete mode 100644 toolsrc/include/vcpkg/binaryparagraph.h delete mode 100644 toolsrc/include/vcpkg/build.h delete mode 100644 toolsrc/include/vcpkg/buildenvironment.h delete mode 100644 toolsrc/include/vcpkg/cmakevars.h delete mode 100644 toolsrc/include/vcpkg/commands.add-version.h delete mode 100644 toolsrc/include/vcpkg/commands.autocomplete.h delete mode 100644 toolsrc/include/vcpkg/commands.buildexternal.h delete mode 100644 toolsrc/include/vcpkg/commands.cache.h delete mode 100644 toolsrc/include/vcpkg/commands.ci.h delete mode 100644 toolsrc/include/vcpkg/commands.ciclean.h delete mode 100644 toolsrc/include/vcpkg/commands.civerifyversions.h delete mode 100644 toolsrc/include/vcpkg/commands.contact.h delete mode 100644 toolsrc/include/vcpkg/commands.create.h delete mode 100644 toolsrc/include/vcpkg/commands.dependinfo.h delete mode 100644 toolsrc/include/vcpkg/commands.edit.h delete mode 100644 toolsrc/include/vcpkg/commands.env.h delete mode 100644 toolsrc/include/vcpkg/commands.fetch.h delete mode 100644 toolsrc/include/vcpkg/commands.format-manifest.h delete mode 100644 toolsrc/include/vcpkg/commands.h delete mode 100644 toolsrc/include/vcpkg/commands.hash.h delete mode 100644 toolsrc/include/vcpkg/commands.info.h delete mode 100644 toolsrc/include/vcpkg/commands.integrate.h delete mode 100644 toolsrc/include/vcpkg/commands.interface.h delete mode 100644 toolsrc/include/vcpkg/commands.list.h delete mode 100644 toolsrc/include/vcpkg/commands.owns.h delete mode 100644 toolsrc/include/vcpkg/commands.porthistory.h delete mode 100644 toolsrc/include/vcpkg/commands.portsdiff.h delete mode 100644 toolsrc/include/vcpkg/commands.search.h delete mode 100644 toolsrc/include/vcpkg/commands.setinstalled.h delete mode 100644 toolsrc/include/vcpkg/commands.upgrade.h delete mode 100644 toolsrc/include/vcpkg/commands.upload-metrics.h delete mode 100644 toolsrc/include/vcpkg/commands.version.h delete mode 100644 toolsrc/include/vcpkg/commands.xvsinstances.h delete mode 100644 toolsrc/include/vcpkg/configuration.h delete mode 100644 toolsrc/include/vcpkg/dependencies.h delete mode 100644 toolsrc/include/vcpkg/export.chocolatey.h delete mode 100644 toolsrc/include/vcpkg/export.h delete mode 100644 toolsrc/include/vcpkg/export.ifw.h delete mode 100644 toolsrc/include/vcpkg/export.prefab.h delete mode 100644 toolsrc/include/vcpkg/fwd/build.h delete mode 100644 toolsrc/include/vcpkg/fwd/cmakevars.h delete mode 100644 toolsrc/include/vcpkg/fwd/configuration.h delete mode 100644 toolsrc/include/vcpkg/fwd/dependencies.h delete mode 100644 toolsrc/include/vcpkg/fwd/packagespec.h delete mode 100644 toolsrc/include/vcpkg/fwd/portfileprovider.h delete mode 100644 toolsrc/include/vcpkg/fwd/registries.h delete mode 100644 toolsrc/include/vcpkg/fwd/vcpkgcmdarguments.h delete mode 100644 toolsrc/include/vcpkg/fwd/vcpkgpaths.h delete mode 100644 toolsrc/include/vcpkg/globalstate.h delete mode 100644 toolsrc/include/vcpkg/help.h delete mode 100644 toolsrc/include/vcpkg/input.h delete mode 100644 toolsrc/include/vcpkg/install.h delete mode 100644 toolsrc/include/vcpkg/metrics.h delete mode 100644 toolsrc/include/vcpkg/packagespec.h delete mode 100644 toolsrc/include/vcpkg/paragraphparser.h delete mode 100644 toolsrc/include/vcpkg/paragraphs.h delete mode 100644 toolsrc/include/vcpkg/platform-expression.h delete mode 100644 toolsrc/include/vcpkg/portfileprovider.h delete mode 100644 toolsrc/include/vcpkg/postbuildlint.buildtype.h delete mode 100644 toolsrc/include/vcpkg/postbuildlint.h delete mode 100644 toolsrc/include/vcpkg/registries.h delete mode 100644 toolsrc/include/vcpkg/remove.h delete mode 100644 toolsrc/include/vcpkg/sourceparagraph.h delete mode 100644 toolsrc/include/vcpkg/statusparagraph.h delete mode 100644 toolsrc/include/vcpkg/statusparagraphs.h delete mode 100644 toolsrc/include/vcpkg/textrowcol.h delete mode 100644 toolsrc/include/vcpkg/tools.h delete mode 100644 toolsrc/include/vcpkg/triplet.h delete mode 100644 toolsrc/include/vcpkg/update.h delete mode 100644 toolsrc/include/vcpkg/userconfig.h delete mode 100644 toolsrc/include/vcpkg/vcpkgcmdarguments.h delete mode 100644 toolsrc/include/vcpkg/vcpkglib.h delete mode 100644 toolsrc/include/vcpkg/vcpkgpaths.h delete mode 100644 toolsrc/include/vcpkg/versiondeserializers.h delete mode 100644 toolsrc/include/vcpkg/versions.h delete mode 100644 toolsrc/include/vcpkg/versiont.h delete mode 100644 toolsrc/include/vcpkg/visualstudio.h delete mode 100644 toolsrc/src/pch.cpp delete mode 100644 toolsrc/src/tls12-download.c delete mode 100644 toolsrc/src/vcpkg-fuzz/main.cpp delete mode 100644 toolsrc/src/vcpkg-test/arguments.cpp delete mode 100644 toolsrc/src/vcpkg-test/binarycaching.cpp delete mode 100644 toolsrc/src/vcpkg-test/binaryconfigparser.cpp delete mode 100644 toolsrc/src/vcpkg-test/catch.cpp delete mode 100644 toolsrc/src/vcpkg-test/chrono.cpp delete mode 100644 toolsrc/src/vcpkg-test/commands.cpp delete mode 100644 toolsrc/src/vcpkg-test/dependencies.cpp delete mode 100644 toolsrc/src/vcpkg-test/downloads.cpp delete mode 100644 toolsrc/src/vcpkg-test/files.cpp delete mode 100644 toolsrc/src/vcpkg-test/hash.cpp delete mode 100644 toolsrc/src/vcpkg-test/json.cpp delete mode 100644 toolsrc/src/vcpkg-test/large-json-document.json.inc delete mode 100644 toolsrc/src/vcpkg-test/manifests.cpp delete mode 100644 toolsrc/src/vcpkg-test/mockcmakevarsprovider.cpp delete mode 100644 toolsrc/src/vcpkg-test/optional.cpp delete mode 100644 toolsrc/src/vcpkg-test/paragraph.cpp delete mode 100644 toolsrc/src/vcpkg-test/plan.cpp delete mode 100644 toolsrc/src/vcpkg-test/platform-expression.cpp delete mode 100644 toolsrc/src/vcpkg-test/registries.cpp delete mode 100644 toolsrc/src/vcpkg-test/specifier.cpp delete mode 100644 toolsrc/src/vcpkg-test/statusparagraphs.cpp delete mode 100644 toolsrc/src/vcpkg-test/strings.cpp delete mode 100644 toolsrc/src/vcpkg-test/stringview.cpp delete mode 100644 toolsrc/src/vcpkg-test/system.cpp delete mode 100644 toolsrc/src/vcpkg-test/uint128.cpp delete mode 100644 toolsrc/src/vcpkg-test/update.cpp delete mode 100644 toolsrc/src/vcpkg-test/util.cpp delete mode 100644 toolsrc/src/vcpkg-test/versionplan.cpp delete mode 100644 toolsrc/src/vcpkg.cpp delete mode 100644 toolsrc/src/vcpkg/archives.cpp delete mode 100644 toolsrc/src/vcpkg/base/checks.cpp delete mode 100644 toolsrc/src/vcpkg/base/chrono.cpp delete mode 100644 toolsrc/src/vcpkg/base/cofffilereader.cpp delete mode 100644 toolsrc/src/vcpkg/base/downloads.cpp delete mode 100644 toolsrc/src/vcpkg/base/enums.cpp delete mode 100644 toolsrc/src/vcpkg/base/files.cpp delete mode 100644 toolsrc/src/vcpkg/base/hash.cpp delete mode 100644 toolsrc/src/vcpkg/base/json.cpp delete mode 100644 toolsrc/src/vcpkg/base/machinetype.cpp delete mode 100644 toolsrc/src/vcpkg/base/parse.cpp delete mode 100644 toolsrc/src/vcpkg/base/strings.cpp delete mode 100644 toolsrc/src/vcpkg/base/stringview.cpp delete mode 100644 toolsrc/src/vcpkg/base/system.cpp delete mode 100644 toolsrc/src/vcpkg/base/system.print.cpp delete mode 100644 toolsrc/src/vcpkg/base/system.process.cpp delete mode 100644 toolsrc/src/vcpkg/base/uint128.cpp delete mode 100644 toolsrc/src/vcpkg/base/unicode.cpp delete mode 100644 toolsrc/src/vcpkg/base/xmlserializer.cpp delete mode 100644 toolsrc/src/vcpkg/binarycaching.cpp delete mode 100644 toolsrc/src/vcpkg/binaryparagraph.cpp delete mode 100644 toolsrc/src/vcpkg/build.cpp delete mode 100644 toolsrc/src/vcpkg/buildenvironment.cpp delete mode 100644 toolsrc/src/vcpkg/cmakevars.cpp delete mode 100644 toolsrc/src/vcpkg/commands.add-version.cpp delete mode 100644 toolsrc/src/vcpkg/commands.autocomplete.cpp delete mode 100644 toolsrc/src/vcpkg/commands.buildexternal.cpp delete mode 100644 toolsrc/src/vcpkg/commands.cache.cpp delete mode 100644 toolsrc/src/vcpkg/commands.ci.cpp delete mode 100644 toolsrc/src/vcpkg/commands.ciclean.cpp delete mode 100644 toolsrc/src/vcpkg/commands.civerifyversions.cpp delete mode 100644 toolsrc/src/vcpkg/commands.contact.cpp delete mode 100644 toolsrc/src/vcpkg/commands.cpp delete mode 100644 toolsrc/src/vcpkg/commands.create.cpp delete mode 100644 toolsrc/src/vcpkg/commands.dependinfo.cpp delete mode 100644 toolsrc/src/vcpkg/commands.edit.cpp delete mode 100644 toolsrc/src/vcpkg/commands.env.cpp delete mode 100644 toolsrc/src/vcpkg/commands.fetch.cpp delete mode 100644 toolsrc/src/vcpkg/commands.format-manifest.cpp delete mode 100644 toolsrc/src/vcpkg/commands.hash.cpp delete mode 100644 toolsrc/src/vcpkg/commands.info.cpp delete mode 100644 toolsrc/src/vcpkg/commands.integrate.cpp delete mode 100644 toolsrc/src/vcpkg/commands.list.cpp delete mode 100644 toolsrc/src/vcpkg/commands.owns.cpp delete mode 100644 toolsrc/src/vcpkg/commands.porthistory.cpp delete mode 100644 toolsrc/src/vcpkg/commands.portsdiff.cpp delete mode 100644 toolsrc/src/vcpkg/commands.search.cpp delete mode 100644 toolsrc/src/vcpkg/commands.setinstalled.cpp delete mode 100644 toolsrc/src/vcpkg/commands.upgrade.cpp delete mode 100644 toolsrc/src/vcpkg/commands.upload-metrics.cpp delete mode 100644 toolsrc/src/vcpkg/commands.version.cpp delete mode 100644 toolsrc/src/vcpkg/commands.xvsinstances.cpp delete mode 100644 toolsrc/src/vcpkg/configuration.cpp delete mode 100644 toolsrc/src/vcpkg/dependencies.cpp delete mode 100644 toolsrc/src/vcpkg/export.chocolatey.cpp delete mode 100644 toolsrc/src/vcpkg/export.cpp delete mode 100644 toolsrc/src/vcpkg/export.ifw.cpp delete mode 100644 toolsrc/src/vcpkg/export.prefab.cpp delete mode 100644 toolsrc/src/vcpkg/globalstate.cpp delete mode 100644 toolsrc/src/vcpkg/help.cpp delete mode 100644 toolsrc/src/vcpkg/input.cpp delete mode 100644 toolsrc/src/vcpkg/install.cpp delete mode 100644 toolsrc/src/vcpkg/metrics.cpp delete mode 100644 toolsrc/src/vcpkg/packagespec.cpp delete mode 100644 toolsrc/src/vcpkg/paragraphs.cpp delete mode 100644 toolsrc/src/vcpkg/platform-expression.cpp delete mode 100644 toolsrc/src/vcpkg/portfileprovider.cpp delete mode 100644 toolsrc/src/vcpkg/postbuildlint.buildtype.cpp delete mode 100644 toolsrc/src/vcpkg/postbuildlint.cpp delete mode 100644 toolsrc/src/vcpkg/registries.cpp delete mode 100644 toolsrc/src/vcpkg/remove.cpp delete mode 100644 toolsrc/src/vcpkg/sourceparagraph.cpp delete mode 100644 toolsrc/src/vcpkg/spdx-exceptions.inc delete mode 100644 toolsrc/src/vcpkg/spdx-licenses.inc delete mode 100644 toolsrc/src/vcpkg/statusparagraph.cpp delete mode 100644 toolsrc/src/vcpkg/statusparagraphs.cpp delete mode 100644 toolsrc/src/vcpkg/tools.cpp delete mode 100644 toolsrc/src/vcpkg/triplet.cpp delete mode 100644 toolsrc/src/vcpkg/update.cpp delete mode 100644 toolsrc/src/vcpkg/userconfig.cpp delete mode 100644 toolsrc/src/vcpkg/vcpkgcmdarguments.cpp delete mode 100644 toolsrc/src/vcpkg/vcpkglib.cpp delete mode 100644 toolsrc/src/vcpkg/vcpkgpaths.cpp delete mode 100644 toolsrc/src/vcpkg/versiondeserializers.cpp delete mode 100644 toolsrc/src/vcpkg/versions.cpp delete mode 100644 toolsrc/src/vcpkg/versiont.cpp delete mode 100644 toolsrc/src/vcpkg/visualstudio.cpp delete mode 100644 toolsrc/vcpkg.natvis delete mode 100644 toolsrc/windows-bootstrap/vcpkg.vcxproj diff --git a/.gitignore b/.gitignore index 6b77e62bab..15b8c8b6dd 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,6 @@ *.userosscache *.sln.docstates -toolsrc/out* -toolsrc/CMakeSettings.json # fuzzing sync_dir* @@ -30,8 +28,6 @@ bld/ [Bb]in/ [Oo]bj/ [Ll]og/ -# VS Code build -toolsrc/build # Ignore the executable /vcpkg /vcpkg.exe @@ -290,11 +286,6 @@ __pycache__/ /installed*/ /packages/ /scripts/buildsystems/tmp/ -/toolsrc/build.rel/ -/toolsrc/windows-bootstrap/msbuild.x86.debug/ -/toolsrc/windows-bootstrap/msbuild.x86.release/ -/toolsrc/windows-bootstrap/msbuild.x64.debug/ -/toolsrc/windows-bootstrap/msbuild.x64.release/ #ignore custom triplets /triplets/* #add vcpkg-designed triplets back in diff --git a/docs/about/privacy.md b/docs/about/privacy.md index 15ef69d763..5efecb6790 100644 --- a/docs/about/privacy.md +++ b/docs/about/privacy.md @@ -41,7 +41,7 @@ We collect various telemetry events such as the command line used, the time of i You can see the telemetry events any command by appending `--printmetrics` after the vcpkg command line. -In the source code (included in `toolsrc\`), you can search for calls to the functions `track_property()`, `track_feature()`, `track_metric()`, and `track_buildtime()` +In the source code (included at https://github.com/microsoft/vcpkg-tool/ ), you can search for calls to the functions `track_property()`, `track_feature()`, `track_metric()`, and `track_buildtime()` to see every specific data point we collect. ## Avoid inadvertent disclosure information diff --git a/docs/tool-maintainers/benchmarking.md b/docs/tool-maintainers/benchmarking.md deleted file mode 100644 index e0295be50b..0000000000 --- a/docs/tool-maintainers/benchmarking.md +++ /dev/null @@ -1,195 +0,0 @@ -# Benchmarking - -Benchmarking new code against old code is extremely important whenever making -large changes to how something works. If you are attempting to make something -faster, and you end up slowing it down, you'll never know if you don't -benchmark! We have benchmarks in the `toolsrc/src/vcpkg-test` directory, just -like the tests -- they're treated as a special kind of test. - -## Running Benchmarks - -Unlike normal tests, benchmarks are hidden behind a special define -- `CATCH_CONFIG_ENABLE_BENCHMARKING` -- so that you never try to run benchmarks -unless you specifically want to. This is because benchmarks actually take quite -a long time! However, if you want to run benchmarks (and I recommend running -only specific benchmarks at a time), you can do so by passing the -`VCPKG_ENABLE_BENCHMARKING` option at cmake configure time. - -```sh -$ cmake -B toolsrc/out -S toolsrc -G Ninja \ - -DCMAKE_BUILD_TYPE=Release \ - -DVCPKG_BUILD_BENCHMARKING=On - --- The C compiler identification is MSVC 19.22.27905.0 --- The CXX compiler identification is MSVC 19.22.27905.0 --- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe --- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works --- Detecting C compiler ABI info --- Detecting C compiler ABI info - done --- Detecting C compile features --- Detecting C compile features - done --- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe --- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe -- works --- Detecting CXX compiler ABI info --- Detecting CXX compiler ABI info - done --- Detecting CXX compile features --- Detecting CXX compile features - done --- Looking for pthread.h --- Looking for pthread.h - not found --- Found Threads: TRUE --- Configuring done --- Generating done --- Build files have been written to: C:/Users/t-nimaz/src/vcpkg/toolsrc/out - -$ cmake --build toolsrc/out - -[0/2] Re-checking globbed directories... -[80/80] Linking CXX executable vcpkg-test.exe -``` - -You can then run benchmarks easily with the following command (which run the -files benchmarks): - -```sh -$ ./toolsrc/out/vcpkg-test [!benchmark][file] -``` - -You can switch out `[file]` for a different set -- `[hash]`, for example. - -## Writing Benchmarks - -First, before anything else, I recommend reading the -[benchmarking documentation] at Catch2's repository. - -Now, after that, let's say that you wanted to benchmark, say, our ASCII -case-insensitive string compare against your new implementation. We place -benchmarks for code in the same file as their tests, so open -`vcpkg-test/strings.cpp`, and add the following at the bottom: - -```cpp -#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING) -TEST_CASE ("case insensitive ascii equals: benchmark", "[strings][!benchmark]") -{ - BENCHMARK("qwertyuiop") { - return vcpkg::Strings::case_insensitive_ascii_equals("qwertyuiop", "QWERTYUIOP"); - }; -} -#endif -``` - -Remember the `;` at the end of the benchmark -- it's not required for -`TEST_CASE`s, but is for `BENCHMARK`s. - -Now, let's rebuild and run: - -```sh -$ cmake --build toolsrc/out -[0/2] Re-checking globbed directories... -[2/2] Linking CXX executable vcpkg-test.exe -$ ./toolsrc/out/vcpkg-test [strings][!benchmark] -Filters: [strings][!benchmark] - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -vcpkg-test.exe is a Catch v2.9.1 host application. -Run with -? for options - -------------------------------------------------------------------------------- -case insensitive ascii equals: benchmark -------------------------------------------------------------------------------- -C:\Users\t-nimaz\src\vcpkg\toolsrc\src\vcpkg-test\strings.cpp(36) -............................................................................... - -benchmark name samples iterations estimated - mean low mean high mean - std dev low std dev high std dev -------------------------------------------------------------------------------- -qwertyuiop 100 2088 3.9672 ms - 25 ns 24 ns 26 ns - 6 ns 5 ns 8 ns - - -=============================================================================== -test cases: 1 | 1 passed -assertions: - none - -``` - -You've now written your first benchmark! - -But wait. This seems kind of silly. Benchmarking the comparison of literal -strings is great and all, but could we make it a little more realistic? - -This is where `BENCHMARK_ADVANCED` comes in. `BENCHMARK_ADVANCED` allows one to -write a benchmark that has a little setup to it without screwing up the numbers. -Let's try it now: - -```cpp -TEST_CASE ("case insensitive ascii equals: benchmark", "[strings][!benchmark]") -{ - BENCHMARK_ADVANCED("equal strings")(Catch::Benchmark::Chronometer meter) - { - std::vector strings; - strings.resize(meter.runs()); - std::mt19937_64 urbg; - std::uniform_int_distribution data_generator; - - std::generate(strings.begin(), strings.end(), [&] { - std::string result; - for (std::size_t i = 0; i < 1000; ++i) - { - result += vcpkg::Strings::b32_encode(data_generator(urbg)); - } - - return result; - }); - - meter.measure( - [&](int run) { return vcpkg::Strings::case_insensitive_ascii_equals(strings[run], strings[run]); }); - }; -} -``` - -Then, run it again! - -```sh -$ cmake --build toolsrc/out -[0/2] Re-checking globbed directories... -[2/2] Linking CXX executable vcpkg-test.exe -$ toolsrc/out/vcpkg-test [strings][!benchmark] -Filters: [strings][!benchmark] - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -vcpkg-test.exe is a Catch v2.9.1 host application. -Run with -? for options - -------------------------------------------------------------------------------- -case insensitive ascii equals: benchmark -------------------------------------------------------------------------------- -C:\Users\t-nimaz\src\vcpkg\toolsrc\src\vcpkg-test\strings.cpp(36) -............................................................................... - -benchmark name samples iterations estimated - mean low mean high mean - std dev low std dev high std dev -------------------------------------------------------------------------------- -equal strings 100 2 5.4806 ms - 22.098 us 21.569 us 23.295 us - 3.842 us 2.115 us 7.41 us - - -=============================================================================== -test cases: 1 | 1 passed -assertions: - none - -``` - -And now you have a working benchmark to test the speed of the existing code, and -of new code! - -If you're writing a lot of benchmarks that follow the same sort of pattern, with -some differences in constants, look into `vcpkg-test/files.cpp`'s benchmarks -- -there are a lot of things one can do to make writing new benchmarks really easy. - -If you wish to add a benchmark for a piece of code that has not yet been tested, -please read the [testing documentation], and please write some unit tests. -The speed of your code isn't very important if it doesn't work at all! - -[benchmarking documentation]: https://github.com/catchorg/Catch2/blob/master/docs/benchmarks.md#top -[testing documentation]: ./testing.md#adding-new-test-files diff --git a/docs/tool-maintainers/layout.md b/docs/tool-maintainers/layout.md deleted file mode 100644 index ca9fa5c6ae..0000000000 --- a/docs/tool-maintainers/layout.md +++ /dev/null @@ -1,74 +0,0 @@ -# Layout of the vcpkg source tree - -All vcpkg sources and build systems are in `toolsrc`. If you'd like to -contribute to the vcpkg tool itself, most of your time will be spent in here. - -## Build Files - -These are the files used to build and configure the project. In order to build -with CMake, the only files you should be interested in are `CMakeLists.txt`, and -`.clang-format`; in order to build with msbuild or the Visual Studio IDE, you -will be interested in `dirs.proj` or `vcpkg.sln`. However, if you add or remove -files, you will need to edit the MSBuild project files in the `vcpkg*` -directories no matter what system you use. - -### Top Level - -We have six files in this directory -- one `.clang-format` file, one -`CMakeLists.txt` file, three Visual Studio files, and `VERSION.txt`. - - - `.clang-format`: This is where we store the formatting settings of the - project. If you want to format the project, you can use the `format` target - with the CMake build system. - - `CMakeLists.txt`: This is where the CMake build system definition lives. If - you want to modify how one builds the project, or add a target, you can do - it here. - - `VERSION.txt`: This is a file which tells `vcpkg` to tell the user to - rebuild. If this version is different from the version when the user built - the binary (for example, after a `git pull` or a `vcpkg update`), then - `vcpkg` will print a message to re-bootstrap. This is updated whenever major - changes are made to the `vcpkg` tool. - - The Visual Studio files: - - `vcpkg.natvis`: NATVIS files allow one to visualize objects of user - defined type in the debugger -- this one contains the definitions for - `vcpkg`'s types. - - `dirs.proj`: This is how one builds with `msbuild` without calling into - the IDE. - - `vcpkg.sln`: The solution file is how one opens the project in the VS IDE. - -## Source Files - -If you're modifying the project, it's likely that these are the directories that -you're going to deal with. - -### `include` - -There's one file in here -- `pch.h`. This contains most of the C++ standard -library, and acts as a [precompiled header]. You can read more at the link. - -There are three directories: - - - `catch2` -- This contains the single-header library [catch2]. We use this - library for both [testing] and [benchmarking]. - - `vcpkg` -- This contains the header files for the `vcpkg` project. All of - the interfaces for building, installing, and generally "port stuff" live - here. - - `vcpkg/base` -- This contains the interfaces for the - "vcpkg standard library" -- file handling, hashing, strings, - `Span`, printing, etc. - - `vcpkg-test` -- This contains the interfaces for any common utilities - required by the tests. - -### `src` - -The source files live here. `pch.cpp` is the source file for the -[precompiled header]; `vcpkg.cpp` is where the `vcpkg` binary lives. - -The interesting files live in the `vcpkg` and `vcpkg-test` directories. In -`vcpkg`, you have the implementation for the interfaces that live in -`include/vcpkg`; and in `vcpkg-test`, you have the tests and benchmarks. - -[precompiled header]: https://en.wikipedia.org/wiki/Precompiled_header -[catch2]: https://github.com/catchorg/Catch2 -[testing]: ./testing.md -[benchmarking]: ./benchmarking.md diff --git a/docs/tool-maintainers/testing.md b/docs/tool-maintainers/testing.md deleted file mode 100644 index a9e866d9e8..0000000000 --- a/docs/tool-maintainers/testing.md +++ /dev/null @@ -1,152 +0,0 @@ -# Testing - -Testing vcpkg is important whenever one makes changes to the tool itself, and -writing new tests and keeping them up to date is also very important. If one's -code is subtly broken, we'd rather find it out right away than a few weeks down -the line when someone complains! - -## Running Tests - -Before anything else, we should know whether you can actually run the tests! -All you should need is a way to build vcpkg -- anything will do! All you have to -do is follow the guide 😄 - -With `$VCPKG_DIRECTORY` being the directory where you have cloned vcpkg, create -a build directory in `$VCPKG_DIRECTORY/toolsrc` (commonly named `out`), and -`cd` into it. Make sure to clean it out if it already exists! - -```sh -$ cmake .. -DCMAKE_BUILD_TYPE=Debug -G Ninja -$ cmake --build . -$ ./vcpkg-test # ./vcpkg-test [$SPECIFIC_TEST] for a specific set of tests -$ # i.e., ./vcpkg-test [arguments] -``` - -If you make any modifications to `vcpkg`, you'll have to do the -`cmake --build .` step again. - -## Writing Tests - -In your journey to write new tests, and to modify existing tests, reading the -[Catch2 documentation] will be very helpful! Come back after reading those 😀 - -You'll want to place your tests in one of the existing files, or, if it doesn't -belong in any of those, in a [new file](#adding-new-test-files). - -The layout of these tests is as follows: - -```cpp -// ... includes - -TEST_CASE("Name of test", "[filename without the .cpp]") { - // setup and the like - REQUIRE(some boolean expression); -} - -// etc. -``` - -You want to give these test cases good, descriptive, unique names, like -`SourceParagraph construct minimum` -- it doesn't need to be extremely clear -english, and shorthand is good, but make sure it's clear what the test is from -the name. For the latter parameter, known as "tags", you should at least put the -name of the file which the test case is in -- e.g., in `arguments.cpp`, you'd -tag all of the test cases with `[arguments]`. - -If you wish to add helper functions, make sure to place them in an anonymous -namespace -- this will ensure that they don't trample over anybody else's -space. Additionally, there are a few helper functions that live in -`` and `src/vcpkg-test/util.cpp` -- make sure to look into -them so that you're not rewriting functionality. - -That should be all you need to know to start writing your own tests! -Remember to check out the [Catch2 documentation] -if you'd like to get more advanced with your tests, -and good luck on your testing journey! - -## Adding New Test Files - -Adding new test files should be easy and straightforward. All it requires is -creating a new source file in `toolsrc/src/vcpkg-test`. - -### Example - -Let's try writing a new test file called `example` (very creative, I know). - -First, we should create a file, `example.cpp`, in `toolsrc/src/vcpkg-test`: - -```cpp -// vcpkg-test/example.cpp -#include -``` - -This is the minimum file needed for tests; let's rebuild! - -```sh -$ cmake --build . -[80/80] Linking CXX executable vcpkg.exe -``` - -Okay, now let's make sure this worked; add a test case to `example.cpp`: - -```cpp -TEST_CASE("Example 1 - fail", "[example]") { - REQUIRE(false); -} -``` - -Now build the tests again, and run them: - -```sh -$ cmake --build . -[2/2] Linking CXX executable vcpkg-test.exe -$ ./vcpkg-test - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -vcpkg-test.exe is a Catch v2.9.1 host application. -Run with -? for options - -------------------------------------------------------------------------------- -Example 1 - fail -------------------------------------------------------------------------------- -$VCPKG_DIRECTORY/toolsrc/src/vcpkg-test/example.cpp(3) -............................................................................... - -$VCPKG_DIRECTORY/toolsrc/src/vcpkg-test/example.cpp(14): FAILED: - REQUIRE( false ) - -=============================================================================== -test cases: 102 | 101 passed | 1 failed -assertions: 3611 | 3610 passed | 1 failed -``` - -Hopefully, that worked! It should compile correctly, and have one failing test. -Now let's try a more complex test, after deleting the old one; - -```cpp -// add #include to the top of the file -namespace Strings = vcpkg::Strings; - -TEST_CASE("Example 2 - success", "[example]") { - std::string hello = "Hello"; - REQUIRE(Strings::case_insensitive_ascii_equals(hello, "hELLo")); - REQUIRE_FALSE(Strings::case_insensitive_ascii_starts_with(hello, "E")); -} -``` - -Now compile and build the tests, and this time let's only run our example tests: - -```sh -$ cmake --build . -[2/2] Linking CXX executable vcpkg-test.exe -$ ./vcpkg-test [example] -Filters: [example] -=============================================================================== -All tests passed (2 assertions in 1 test case) -``` - -Hopefully you have one test running and succeeding! If you have that, you have -succeeded at adding a new file to vcpkg's tests. Congratulations! Have fun on -the rest of your journey 🐱‍👤😁 - -[Catch2 documentation]: https://github.com/catchorg/Catch2/blob/master/docs/tutorial.md#top diff --git a/scripts/Generate-SpdxLicenseList.ps1 b/scripts/Generate-SpdxLicenseList.ps1 deleted file mode 100644 index 8af5fd4de0..0000000000 --- a/scripts/Generate-SpdxLicenseList.ps1 +++ /dev/null @@ -1,63 +0,0 @@ -<# -#> -[CmdletBinding(PositionalBinding=$False)] -Param( - [Parameter(Mandatory=$True)] - [string]$Commit, - - [Parameter()] - [string]$GithubRepository = "spdx/license-list-data", - - [Parameter()] - [string]$LicensesOutFile = "$PSScriptRoot/../toolsrc/src/vcpkg/spdx-licenses.inc", - - [Parameter()] - [string]$ExceptionsOutFile = "$PSScriptRoot/../toolsrc/src/vcpkg/spdx-exceptions.inc" -) - -function Transform-JsonFile { - [CmdletBinding()] - Param( - [string]$Uri, - [string]$OutFile, - [string]$OuterName, - [string]$Id - ) - - $req = Invoke-WebRequest -Uri $Uri - - if ($req.StatusCode -ne 200) - { - Write-Error "Failed to GET $Uri" - throw - } - - $json = $req.Content | ConvertFrom-Json -Depth 10 - Write-Verbose "Writing output to $OutFile" - - $fileContent = @( - "// Data downloaded from $Uri", - "// Generated by scripts/Generate-SpdxLicenseList.ps1", - "{") - $json.$OuterName | ForEach-Object { - $fileContent += " `"$($_.$Id)`"," - } - $fileContent += "}" - - $fileContent -join "`n" | Out-File -FilePath $OutFile -Encoding 'utf8' -} - -$baseUrl = "https://raw.githubusercontent.com/$GithubRepository/$Commit/json" -Write-Verbose "Getting json files from $baseUrl" - -Transform-JsonFile ` - -Uri "$baseUrl/licenses.json" ` - -OutFile $LicensesOutFile ` - -OuterName 'licenses' ` - -Id 'licenseId' - -Transform-JsonFile ` - -Uri "$baseUrl/exceptions.json" ` - -OutFile $ExceptionsOutFile ` - -OuterName 'exceptions' ` - -Id 'licenseExceptionId' diff --git a/scripts/azure-pipelines/Create-FormatDiff.ps1 b/scripts/azure-pipelines/Create-PRDiff.ps1 similarity index 100% rename from scripts/azure-pipelines/Create-FormatDiff.ps1 rename to scripts/azure-pipelines/Create-PRDiff.ps1 diff --git a/scripts/azure-pipelines/Format-CxxCode.ps1 b/scripts/azure-pipelines/Format-CxxCode.ps1 deleted file mode 100644 index 2653562a7e..0000000000 --- a/scripts/azure-pipelines/Format-CxxCode.ps1 +++ /dev/null @@ -1,50 +0,0 @@ -[CmdletBinding()] -Param( - [Parameter(Mandatory=$True)] - [string]$Root -) - -$Root = Resolve-Path -LiteralPath $Root - -$clangFormat = Get-Command 'clang-format' -ErrorAction 'SilentlyContinue' -if ($null -ne $clangFormat) -{ - $clangFormat = $clangFormat.Source -} - -if ($IsWindows) -{ - if ([String]::IsNullOrEmpty($clangFormat) -or -not (Test-Path $clangFormat)) - { - $clangFormat = 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\Llvm\x64\bin\clang-format.exe' - } - if (-not (Test-Path $clangFormat)) - { - $clangFormat = 'C:\Program Files\LLVM\bin\clang-format.exe' - } -} - -if ([String]::IsNullOrEmpty($clangFormat) -or -not (Test-Path $clangFormat)) -{ - Write-Error 'clang-format not found; is it installed?' - throw -} - -$toolsrc = Get-Item "$Root/toolsrc" -Push-Location $toolsrc - -try -{ - $files = Get-ChildItem -Recurse -LiteralPath "$toolsrc/src" -Filter '*.cpp' - $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/src" -Filter '*.c' - $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg" -Filter '*.h' - $files += Get-ChildItem -Recurse -LiteralPath "$toolsrc/include/vcpkg-test" -Filter '*.h' - $files += Get-Item "$toolsrc/include/pch.h" - $fileNames = $files.FullName - - & $clangFormat -style=file -i @fileNames -} -finally -{ - Pop-Location -} diff --git a/scripts/azure-pipelines/azure-pipelines.yml b/scripts/azure-pipelines/azure-pipelines.yml index 7fce6a5c19..27db6a93d9 100644 --- a/scripts/azure-pipelines/azure-pipelines.yml +++ b/scripts/azure-pipelines/azure-pipelines.yml @@ -20,12 +20,6 @@ stages: - name: DiffFile value: $(Build.ArtifactStagingDirectory)\format.diff steps: - - task: Powershell@2 - displayName: 'Format C++' - inputs: - filePath: 'scripts/azure-pipelines/Format-CxxCode.ps1' - arguments: '-Root .' - pwsh: true - task: Powershell@2 displayName: 'Generate Documentation' inputs: @@ -33,18 +27,18 @@ stages: arguments: '-VcpkgRoot . -WarningAction Stop' pwsh: true - script: .\bootstrap-vcpkg.bat - displayName: 'Build vcpkg' - - script: '.\vcpkg format-manifest --all' + displayName: 'Bootstrap vcpkg' + - script: '.\vcpkg.exe format-manifest --all' displayName: 'Format Manifests' - task: Powershell@2 displayName: 'Create Diff' inputs: - filePath: scripts/azure-pipelines/Create-FormatDiff.ps1 + filePath: scripts/azure-pipelines/Create-PRDiff.ps1 arguments: '-DiffFile $(DiffFile)' pwsh: true - task: PublishBuildArtifacts@1 condition: failed() - displayName: 'Publish C++ Diff' + displayName: 'Publish Format and Documentation Diff' inputs: PathtoPublish: '$(DiffFile)' ArtifactName: 'format.diff' diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 deleted file mode 100644 index 704b527523..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/backcompat-helpers.ps1 +++ /dev/null @@ -1,24 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -# Test that prohibiting backcompat features actually prohibits -$backcompatFeaturePorts = @('vcpkg-uses-test-cmake', 'vcpkg-uses-vcpkg-common-functions') -foreach ($backcompatFeaturePort in $backcompatFeaturePorts) { - $succeedArgs = $commonArgs + @('install',$backcompatFeaturePort,'--no-binarycaching') - $failArgs = $succeedArgs + @('--x-prohibit-backcompat-features') - $CurrentTest = "Should fail: ./vcpkg $($failArgs -join ' ')" - Run-Vcpkg @failArgs - if ($LastExitCode -ne 0) { - Write-Host "... failed (this is good!)." - } else { - throw $CurrentTest - } - - # Install failed when prohibiting backcompat features, so it should succeed if we allow them - $CurrentTest = "Should succeeed: ./vcpkg $($succeedArgs -join ' ')" - Run-Vcpkg @succeedArgs - if ($LastExitCode -ne 0) { - throw $CurrentTest - } else { - Write-Host "... succeeded." - } -} diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 deleted file mode 100644 index e4ee6e6984..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/binarycaching.ps1 +++ /dev/null @@ -1,86 +0,0 @@ -if ($IsLinux) { - # The tests below need a mono installation not currently available on the Linux agents. - return -} - -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -# Test simple installation -Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--binarycaching", "--x-binarysource=clear;files,$ArchiveRoot,write;nuget,$NuGetRoot,readwrite")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" - -# Test simple removal -Run-Vcpkg -TestArgs ($commonArgs + @("remove", "rapidjson")) -Throw-IfFailed -Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" - -# Test restoring from files archive -Remove-Item -Recurse -Force $installRoot -Remove-Item -Recurse -Force $buildtreesRoot -Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" -Require-FileNotExists "$buildtreesRoot/rapidjson/src" -Require-FileExists "$buildtreesRoot/detect_compiler" - -# Test --no-binarycaching -Remove-Item -Recurse -Force $installRoot -Remove-Item -Recurse -Force $buildtreesRoot -Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--no-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" -Require-FileExists "$buildtreesRoot/rapidjson/src" -Require-FileExists "$buildtreesRoot/detect_compiler" - -# Test --editable -Remove-Item -Recurse -Force $installRoot -Remove-Item -Recurse -Force $buildtreesRoot -Run-Vcpkg -TestArgs ($commonArgs + @("install","rapidjson","--editable","--x-binarysource=clear;files,$ArchiveRoot,read")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" -Require-FileExists "$buildtreesRoot/rapidjson/src" -Require-FileNotExists "$buildtreesRoot/detect_compiler" - -# Test restoring from nuget -Remove-Item -Recurse -Force $installRoot -Remove-Item -Recurse -Force $buildtreesRoot -Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--binarycaching", "--x-binarysource=clear;nuget,$NuGetRoot")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" -Require-FileNotExists "$buildtreesRoot/rapidjson/src" - -# Test four-phase flow -Remove-Item -Recurse -Force $installRoot -ErrorAction SilentlyContinue -Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--dry-run", "--x-write-nuget-packages-config=$TestingRoot/packages.config")) -Throw-IfFailed -Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" -Require-FileNotExists "$buildtreesRoot/rapidjson/src" -Require-FileExists "$TestingRoot/packages.config" -if ($IsLinux -or $IsMacOS) { - mono $(./vcpkg fetch nuget) restore $TestingRoot/packages.config -OutputDirectory "$NuGetRoot2" -Source "$NuGetRoot" -} else { - & $(./vcpkg fetch nuget) restore $TestingRoot/packages.config -OutputDirectory "$NuGetRoot2" -Source "$NuGetRoot" -} -Throw-IfFailed -Remove-Item -Recurse -Force $NuGetRoot -ErrorAction SilentlyContinue -mkdir $NuGetRoot -Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "tinyxml", "--binarycaching", "--x-binarysource=clear;nuget,$NuGetRoot2;nuget,$NuGetRoot,write")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" -Require-FileExists "$installRoot/$Triplet/include/tinyxml.h" -Require-FileNotExists "$buildtreesRoot/rapidjson/src" -Require-FileExists "$buildtreesRoot/tinyxml/src" -if ((Get-ChildItem $NuGetRoot -Filter '*.nupkg' | Measure-Object).Count -ne 1) { - throw "In '$CurrentTest': did not create exactly 1 NuGet package" -} - -# Test export -$CurrentTest = 'Exporting' -Require-FileNotExists "$TestingRoot/vcpkg-export-output" -Require-FileNotExists "$TestingRoot/vcpkg-export.1.0.0.nupkg" -Require-FileNotExists "$TestingRoot/vcpkg-export-output.zip" -Run-Vcpkg -TestArgs ($commonArgs + @("export", "rapidjson", "tinyxml", "--nuget", "--nuget-id=vcpkg-export", "--nuget-version=1.0.0", "--output=vcpkg-export-output", "--raw", "--zip", "--output-dir=$TestingRoot")) -Require-FileExists "$TestingRoot/vcpkg-export-output" -Require-FileExists "$TestingRoot/vcpkg-export.1.0.0.nupkg" -Require-FileExists "$TestingRoot/vcpkg-export-output.zip" diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 deleted file mode 100644 index 5f318e6af9..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/build-missing.ps1 +++ /dev/null @@ -1,18 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -$CurrentTest = "Build Missing tests" - -Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) -Throw-IfNotFailed -Require-FileNotExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" - -# Create the rapidjson archive -Remove-Item -Recurse -Force $installRoot -Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson","--x-binarysource=clear;files,$ArchiveRoot,write")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" - -Remove-Item -Recurse -Force $installRoot -Run-Vcpkg -TestArgs ($commonArgs + @("install", "rapidjson", "--only-binarycaching","--x-binarysource=clear;files,$ArchiveRoot,read")) -Throw-IfFailed -Require-FileExists "$installRoot/$Triplet/include/rapidjson/rapidjson.h" diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/cli.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/cli.ps1 deleted file mode 100644 index 47f624fa8f..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/cli.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -# Test bad command lines -Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--vcpkg-rootttttt", "C:\")) -Throw-IfNotFailed - -Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--vcpkg-rootttttt=C:\")) -Throw-IfNotFailed - -Run-Vcpkg -TestArgs ($commonArgs + @("install", "zlib", "--fast")) # NB: --fast is not a switch -Throw-IfNotFailed diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/create.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/create.ps1 deleted file mode 100644 index 9d59da5396..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/create.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -# Test vcpkg create -$Script:CurrentTest = "create zlib" -Write-Host $Script:CurrentTest -./vcpkg --x-builtin-ports-root=$TestingRoot/ports create zlib https://github.com/madler/zlib/archive/v1.2.11.tar.gz zlib-1.2.11.tar.gz -Throw-IfFailed - -Require-FileExists "$TestingRoot/ports/zlib/portfile.cmake" -Require-FileExists "$TestingRoot/ports/zlib/vcpkg.json" diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/disable-metrics.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/disable-metrics.ps1 deleted file mode 100644 index 5ad7616b48..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/disable-metrics.ps1 +++ /dev/null @@ -1,67 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -# Test that metrics are on by default -$metricsTagName = 'vcpkg.disable-metrics' -$metricsAreDisabledMessage = 'Warning: passed --sendmetrics, but metrics are disabled.' - -function Test-Metrics-Enabled() { - Param( - [Parameter(ValueFromRemainingArguments)] - [string[]]$TestArgs - ) - - $actualArgs = @('version', '--sendmetrics') - if ($TestArgs.Length -ne 0) { - $actualArgs += $TestArgs - } - - $vcpkgOutput = Run-Vcpkg $actualArgs - if ($vcpkgOutput -contains $metricsAreDisabledMessage) { - Write-Host 'Metrics are disabled' - return $false - } - - Write-Host 'Metrics are enabled' - return $true -} - -# By default, metrics are enabled. -Require-FileNotExists $metricsTagName -if (-Not (Test-Metrics-Enabled)) { - throw "Metrics were not on by default." -} - -if (Test-Metrics-Enabled '--disable-metrics') { - throw "Metrics were not disabled by switch." -} - -$env:VCPKG_DISABLE_METRICS = 'ON' -try { - if (Test-Metrics-Enabled) { - throw "Environment variable did not disable metrics." - } - - # Also test that you get no message without --sendmetrics - $vcpkgOutput = Run-Vcpkg list - if ($vcpkgOutput -contains $metricsAreDisabledMessage) { - throw "Disabled metrics emit message even without --sendmetrics" - } - - if (-Not (Test-Metrics-Enabled '--no-disable-metrics')) { - throw "Environment variable to disable metrics could not be overridden by switch." - } -} finally { - Remove-Item env:VCPKG_DISABLE_METRICS -} - -# If the disable-metrics tag file exists, metrics are disabled even if attempted to be enabled on -# the command line. -Set-Content -Path $metricsTagName -Value "" -try { - if (Test-Metrics-Enabled '--disable-metrics') { - throw "Metrics were not force-disabled by the disable-metrics tag file." - } -} -finally { - Remove-Item $metricsTagName -} diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 deleted file mode 100644 index 6de1335d7c..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/env-passthrough.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -if (-not $IsLinux -and -not $IsMacOS) { - . $PSScriptRoot/../end-to-end-tests-prelude.ps1 - - $env:_VCPKG_TEST_TRACKED = "a" - $env:_VCPKG_TEST_UNTRACKED = "b" - - $x = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%" - if ($x -ne "%_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%") - { - throw "env should have cleaned the environment ($x)" - } - - $y = ./vcpkg "--overlay-triplets=$PSScriptRoot/../../testing/env-passthrough" env --triplet passthrough "echo %_VCPKG_TEST_TRACKED% %_VCPKG_TEST_TRACKED2% %_VCPKG_TEST_UNTRACKED% %_VCPKG_TEST_UNTRACKED2%" - if ($y -ne "a %_VCPKG_TEST_TRACKED2% b %_VCPKG_TEST_UNTRACKED2%") - { - throw "env should have kept the environment ($y)" - } - - rm env:_VCPKG_TEST_TRACKED - rm env:_VCPKG_TEST_UNTRACKED -} \ No newline at end of file diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/integrate-install.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/integrate-install.ps1 deleted file mode 100644 index 38362ba8cb..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/integrate-install.ps1 +++ /dev/null @@ -1,28 +0,0 @@ -if (-not $IsLinux -and -not $IsMacOS) { - . $PSScriptRoot/../end-to-end-tests-prelude.ps1 - - # Test msbuild props and targets - $Script:CurrentTest = "zlib:x86-windows-static msbuild scripts\testing\integrate-install\..." - Write-Host $Script:CurrentTest - ./vcpkg $commonArgs install zlib:x86-windows-static --x-binarysource=clear - Throw-IfFailed - foreach ($project in @("VcpkgTriplet", "VcpkgTriplet2", "VcpkgUseStatic", "VcpkgUseStatic2")) { - $Script:CurrentTest = "msbuild scripts\testing\integrate-install\$project.vcxproj" - ./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ " - Throw-IfFailed - Remove-Item -Recurse -Force $TestingRoot\int - Remove-Item -Recurse -Force $TestingRoot\out - } - $Script:CurrentTest = "zlib:x86-windows msbuild scripts\testing\integrate-install\..." - Write-Host $Script:CurrentTest - ./vcpkg $commonArgs install zlib:x86-windows --x-binarysource=clear - Throw-IfFailed - foreach ($project in @("Project1", "NoProps")) { - $Script:CurrentTest = "msbuild scripts\testing\integrate-install\$project.vcxproj" - Write-Host $Script:CurrentTest - ./vcpkg $commonArgs env "msbuild scripts\testing\integrate-install\$project.vcxproj /p:VcpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ " - Throw-IfFailed - Remove-Item -Recurse -Force $TestingRoot\int - Remove-Item -Recurse -Force $TestingRoot\out - } -} diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/registries.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/registries.ps1 deleted file mode 100644 index bdeeb0a15b..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/registries.ps1 +++ /dev/null @@ -1,192 +0,0 @@ -. "$PSScriptRoot/../end-to-end-tests-prelude.ps1" - - -$builtinRegistryArgs = $commonArgs + @("--x-builtin-registry-versions-dir=$PSScriptRoot/../../e2e_ports/versions") - -Run-Vcpkg install @builtinRegistryArgs 'vcpkg-internal-e2e-test-port' -Throw-IfNotFailed - -# We should not look into the versions directory unless we have a baseline, -# even if we pass the registries feature flag -Run-Vcpkg install @builtinRegistryArgs --feature-flags=registries 'vcpkg-internal-e2e-test-port' -Throw-IfNotFailed - -Run-Vcpkg install @builtinRegistryArgs --feature-flags=registries 'zlib' -Throw-IfFailed - -Write-Trace "Test git and filesystem registries" -Refresh-TestRoot -$filesystemRegistry = "$TestingRoot/filesystem-registry" -$gitRegistryUpstream = "$TestingRoot/git-registry-upstream" - -# build a filesystem registry -Write-Trace "build a filesystem registry" -New-Item -Path $filesystemRegistry -ItemType Directory -$filesystemRegistry = (Get-Item $filesystemRegistry).FullName - -Copy-Item -Recurse ` - -LiteralPath "$PSScriptRoot/../../e2e_ports/vcpkg-internal-e2e-test-port" ` - -Destination "$filesystemRegistry" -New-Item ` - -Path "$filesystemRegistry/versions" ` - -ItemType Directory -Copy-Item ` - -LiteralPath "$PSScriptRoot/../../e2e_ports/versions/baseline.json" ` - -Destination "$filesystemRegistry/versions/baseline.json" -New-Item ` - -Path "$filesystemRegistry/versions/v-" ` - -ItemType Directory - -$vcpkgInternalE2eTestPortJson = @{ - "versions" = @( - @{ - "version-string" = "1.0.0"; - "path" = "$/vcpkg-internal-e2e-test-port" - } - ) -} -New-Item ` - -Path "$filesystemRegistry/versions/v-/vcpkg-internal-e2e-test-port.json" ` - -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgInternalE2eTestPortJson) - - -# build a git registry -Write-Trace "build a git registry" -New-Item -Path $gitRegistryUpstream -ItemType Directory -$gitRegistryUpstream = (Get-Item $gitRegistryUpstream).FullName - -Push-Location $gitRegistryUpstream -try -{ - $gitConfigOptions = @( - '-c', 'user.name=Nobody', - '-c', 'user.email=nobody@example.com', - '-c', 'core.autocrlf=false' - ) - - $CurrentTest = 'git init .' - git @gitConfigOptions init . - Throw-IfFailed - Copy-Item -Recurse -LiteralPath "$PSScriptRoot/../../e2e_ports/vcpkg-internal-e2e-test-port" -Destination . - New-Item -Path './vcpkg-internal-e2e-test-port/foobar' -Value 'this is just to get a distinct git tree' - - $CurrentTest = 'git add -A' - git @gitConfigOptions add -A - Throw-IfFailed - $CurrentTest = 'git commit' - git @gitConfigOptions commit -m 'initial commit' - Throw-IfFailed - - $vcpkgInternalE2eTestPortGitTree = git rev-parse 'HEAD:vcpkg-internal-e2e-test-port' - $vcpkgInternalE2eTestPortVersionsJson = @{ - "versions" = @( - @{ - "version-string" = "1.0.0"; - "git-tree" = $vcpkgInternalE2eTestPortGitTree - } - ) - } - $vcpkgBaseline = @{ - "default" = @{ - "vcpkg-internal-e2e-test-port" = @{ - "baseline" = "1.0.0" - } - } - } - - New-Item -Path './versions' -ItemType Directory - New-Item -Path './versions/v-' -ItemType Directory - - New-Item -Path './versions/baseline.json' -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgBaseline) - New-Item -Path './versions/v-/vcpkg-internal-e2e-test-port.json' -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgInternalE2eTestPortVersionsJson) - - $CurrentTest = 'git add -A' - git @gitConfigOptions add -A - Throw-IfFailed - $CurrentTest = 'git commit' - git @gitConfigOptions commit --amend --no-edit - Throw-IfFailed -} -finally -{ - Pop-Location -} - -# actually test the registries -Write-Trace "actually test the registries" -$vcpkgJson = @{ - "name" = "manifest-test"; - "version-string" = "1.0.0"; - "dependencies" = @( - "vcpkg-internal-e2e-test-port" - ) -} - -# test the filesystem registry -Write-Trace "test the filesystem registry" -$manifestDir = "$TestingRoot/filesystem-registry-test-manifest-dir" - -New-Item -Path $manifestDir -ItemType Directory -$manifestDir = (Get-Item $manifestDir).FullName - -Push-Location $manifestDir -try -{ - New-Item -Path 'vcpkg.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgJson) - - $vcpkgConfigurationJson = @{ - "default-registry" = $null; - "registries" = @( - @{ - "kind" = "filesystem"; - "path" = $filesystemRegistry; - "packages" = @( "vcpkg-internal-e2e-test-port" ) - } - ) - } - New-Item -Path 'vcpkg-configuration.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgConfigurationJson) - - Run-Vcpkg install @builtinRegistryArgs '--feature-flags=registries,manifests' - Throw-IfFailed -} -finally -{ - Pop-Location -} - -# test the git registry -Write-Trace "test the git registry" -$manifestDir = "$TestingRoot/git-registry-test-manifest-dir" - -New-Item -Path $manifestDir -ItemType Directory -$manifestDir = (Get-Item $manifestDir).FullName - -Push-Location $manifestDir -try -{ - New-Item -Path 'vcpkg.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgJson) - - $vcpkgConfigurationJson = @{ - "default-registry" = $null; - "registries" = @( - @{ - "kind" = "git"; - "repository" = $gitRegistryUpstream; - "packages" = @( "vcpkg-internal-e2e-test-port" ) - } - ) - } - New-Item -Path 'vcpkg-configuration.json' -ItemType File ` - -Value (ConvertTo-Json -Depth 5 -InputObject $vcpkgConfigurationJson) - - Run-Vcpkg install @builtinRegistryArgs '--feature-flags=registries,manifests' - Throw-IfFailed -} -finally -{ - Pop-Location -} diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/spaces.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/spaces.ps1 deleted file mode 100644 index b7aaf6462c..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/spaces.ps1 +++ /dev/null @@ -1,11 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -##### Test spaces in the path -$Script:CurrentTest = "zlib with spaces in path" -Write-Host $Script:CurrentTest -./vcpkg install zlib "--triplet" $Triplet ` - "--no-binarycaching" ` - "--x-buildtrees-root=$TestingRoot/build Trees" ` - "--x-install-root=$TestingRoot/instalL ed" ` - "--x-packages-root=$TestingRoot/packaG es" -Throw-IfFailed diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 deleted file mode 100644 index 8f512ae7a8..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/vcpkg-minimum-required.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -$successCases = @('vcpkg-requires-current-date', 'vcpkg-requires-old-date') -foreach ($successCase in $successCases) { - $CurrentTest = "Should succeeed: ./vcpkg install $successCase" - Write-Host $CurrentTest - Run-Vcpkg install $successCase @commonArgs - if ($LastExitCode -ne 0) { - throw $CurrentTest - } else { - Write-Host "... succeeded." - } -} - -$CurrentTest = "Should fail: ./vcpkg install vcpkg-requires-future-date" -Write-Host $CurrentTest -Run-Vcpkg install vcpkg-requires-future-date @commonArgs -if ($LastExitCode -ne 0) { - Write-Host "... failed (this is good!)." -} else { - throw $CurrentTest -} diff --git a/scripts/azure-pipelines/end-to-end-tests-dir/versions.ps1 b/scripts/azure-pipelines/end-to-end-tests-dir/versions.ps1 deleted file mode 100644 index 7f927759f6..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-dir/versions.ps1 +++ /dev/null @@ -1,98 +0,0 @@ -. $PSScriptRoot/../end-to-end-tests-prelude.ps1 - -# Test verify versions -mkdir $VersionFilesRoot -Copy-Item -Recurse "scripts/testing/version-files/versions_incomplete" $VersionFilesRoot -$portsRedirectArgsOK = @( - "--feature-flags=versions", - "--x-builtin-ports-root=scripts/testing/version-files/ports", - "--x-builtin-registry-versions-dir=scripts/testing/version-files/versions" -) -$portsRedirectArgsIncomplete = @( - "--feature-flags=versions", - "--x-builtin-ports-root=scripts/testing/version-files/ports_incomplete", - "--x-builtin-registry-versions-dir=$VersionFilesRoot/versions_incomplete" -) -$CurrentTest = "x-verify-ci-versions (All files OK)" -Write-Host $CurrentTest -./vcpkg $portsRedirectArgsOK x-ci-verify-versions --verbose -Throw-IfFailed - -$CurrentTest = "x-verify-ci-versions (Incomplete)" -./vcpkg $portsRedirectArgsIncomplete x-ci-verify-versions --verbose -Throw-IfNotFailed - -$CurrentTest = "x-add-version cat" -# Do not fail if there's nothing to update -./vcpkg $portsRedirectArgsIncomplete x-add-version cat -Throw-IfFailed - -$CurrentTest = "x-add-version dog" -# Local version is not in baseline and versions file -./vcpkg $portsRedirectArgsIncomplete x-add-version dog -Throw-IfFailed - -$CurrentTest = "x-add-version duck" -# Missing versions file -./vcpkg $portsRedirectArgsIncomplete x-add-version duck -Throw-IfFailed - -$CurrentTest = "x-add-version ferret" -# Missing versions file and missing baseline entry -./vcpkg $portsRedirectArgsIncomplete x-add-version ferret -Throw-IfFailed - -$CurrentTest = "x-add-version fish (must fail)" -# Discrepancy between local SHA and SHA in fish.json. Requires --overwrite-version. -$out = ./vcpkg $portsRedirectArgsIncomplete x-add-version fish -Throw-IfNotFailed -$CurrentTest = "x-add-version fish --overwrite-version" -./vcpkg $portsRedirectArgsIncomplete x-add-version fish --overwrite-version -Throw-IfFailed - -$CurrentTest = "x-add-version mouse" -# Missing baseline entry -./vcpkg $portsRedirectArgsIncomplete x-add-version mouse -Throw-IfFailed -# Validate changes -./vcpkg $portsRedirectArgsIncomplete x-ci-verify-versions --verbose -Throw-IfFailed - -$CurrentTest = "default baseline" -$out = ./vcpkg $commonArgs "--feature-flags=versions" install --x-manifest-root=scripts/testing/version-files/default-baseline-1 2>&1 | Out-String -Throw-IfNotFailed -if ($out -notmatch ".*Error: while checking out baseline.*") -{ - $out - throw "Expected to fail due to missing baseline" -} - -git fetch https://github.com/vicroms/test-registries -foreach ($opt_registries in @("",",registries")) -{ - Write-Trace "testing baselines: $opt_registries" - Refresh-TestRoot - $CurrentTest = "without default baseline 2 -- enabling versions should not change behavior" - Remove-Item -Recurse $buildtreesRoot/versioning -ErrorAction SilentlyContinue - ./vcpkg $commonArgs "--feature-flags=versions$opt_registries" install ` - "--dry-run" ` - "--x-manifest-root=scripts/testing/version-files/without-default-baseline-2" ` - "--x-builtin-registry-versions-dir=scripts/testing/version-files/default-baseline-2/versions" - Throw-IfFailed - Require-FileNotExists $buildtreesRoot/versioning - - $CurrentTest = "default baseline 2" - ./vcpkg $commonArgs "--feature-flags=versions$opt_registries" install ` - "--dry-run" ` - "--x-manifest-root=scripts/testing/version-files/default-baseline-2" ` - "--x-builtin-registry-versions-dir=scripts/testing/version-files/default-baseline-2/versions" - Throw-IfFailed - Require-FileExists $buildtreesRoot/versioning - - $CurrentTest = "using version features fails without flag" - ./vcpkg $commonArgs "--feature-flags=-versions$opt_registries" install ` - "--dry-run" ` - "--x-manifest-root=scripts/testing/version-files/default-baseline-2" ` - "--x-builtin-registry-versions-dir=scripts/testing/version-files/default-baseline-2/versions" - Throw-IfNotFailed -} diff --git a/scripts/azure-pipelines/end-to-end-tests-prelude.ps1 b/scripts/azure-pipelines/end-to-end-tests-prelude.ps1 deleted file mode 100644 index 29718bf764..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests-prelude.ps1 +++ /dev/null @@ -1,80 +0,0 @@ -$TestingRoot = Join-Path $WorkingRoot 'testing' -$buildtreesRoot = Join-Path $TestingRoot 'buildtrees' -$installRoot = Join-Path $TestingRoot 'installed' -$packagesRoot = Join-Path $TestingRoot 'packages' -$NuGetRoot = Join-Path $TestingRoot 'nuget' -$NuGetRoot2 = Join-Path $TestingRoot 'nuget2' -$ArchiveRoot = Join-Path $TestingRoot 'archives' -$VersionFilesRoot = Join-Path $TestingRoot 'version-test' -$commonArgs = @( - "--triplet", - $Triplet, - "--x-buildtrees-root=$buildtreesRoot", - "--x-install-root=$installRoot", - "--x-packages-root=$packagesRoot", - "--overlay-ports=$PSScriptRoot/../e2e_ports/overlays" -) -$Script:CurrentTest = 'unassigned' - -if ($IsWindows) -{ - $VcpkgExe = Get-Item './vcpkg.exe' -} -else -{ - $VcpkgExe = Get-Item './vcpkg' -} - -function Refresh-TestRoot { - Remove-Item -Recurse -Force $TestingRoot -ErrorAction SilentlyContinue - mkdir $TestingRoot | Out-Null - mkdir $NuGetRoot | Out-Null -} - -function Require-FileExists { - [CmdletBinding()] - Param( - [string]$File - ) - if (-Not (Test-Path $File)) { - throw "'$Script:CurrentTest' failed to create file '$File'" - } -} - -function Require-FileNotExists { - [CmdletBinding()] - Param( - [string]$File - ) - if (Test-Path $File) { - throw "'$Script:CurrentTest' should not have created file '$File'" - } -} - -function Throw-IfFailed { - if ($LASTEXITCODE -ne 0) { - throw "'$Script:CurrentTest' had a step with a nonzero exit code" - } -} - -function Throw-IfNotFailed { - if ($LASTEXITCODE -eq 0) { - throw "'$Script:CurrentTest' had a step with an unexpectedly zero exit code" - } -} - -function Write-Trace ([string]$text) { - Write-Host (@($MyInvocation.ScriptName, ":", $MyInvocation.ScriptLineNumber, ": ", $text) -join "") -} - -function Run-Vcpkg { - Param( - [Parameter(ValueFromRemainingArguments)] - [string[]]$TestArgs - ) - $Script:CurrentTest = "vcpkg $($testArgs -join ' ')" - Write-Host $Script:CurrentTest - & $VcpkgExe @testArgs -} - -Refresh-TestRoot diff --git a/scripts/azure-pipelines/end-to-end-tests.ps1 b/scripts/azure-pipelines/end-to-end-tests.ps1 deleted file mode 100644 index 8858b362e7..0000000000 --- a/scripts/azure-pipelines/end-to-end-tests.ps1 +++ /dev/null @@ -1,55 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# SPDX-License-Identifier: MIT -# -<# -.SYNOPSIS -End-to-End tests for the vcpkg executable. - -.DESCRIPTION -These tests cover the command line interface and broad functions of vcpkg, including `install`, `remove` and certain -binary caching scenarios. They use the vcpkg executable in the current directory. - -.PARAMETER Triplet -The triplet to use for testing purposes. - -.PARAMETER WorkingRoot -The location used as scratch space for testing. - -#> - -[CmdletBinding()] -Param( - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$Triplet, - [Parameter(Mandatory = $true)] - [ValidateNotNullOrEmpty()] - [string]$WorkingRoot, - [Parameter(Mandatory = $false)] - [ValidateNotNullOrEmpty()] - [string]$Filter -) - -$ErrorActionPreference = "Stop" - -if (-Not (Test-Path $WorkingRoot)) { - New-Item -Path $WorkingRoot -ItemType Directory -} - -$WorkingRoot = (Get-Item $WorkingRoot).FullName - -$AllTests = Get-ChildItem $PSScriptRoot/end-to-end-tests-dir/*.ps1 -if ($Filter -ne $Null) { - $AllTests = $AllTests | ? { $_.Name -match $Filter } -} -$n = 1 -$m = $AllTests.Count - -$AllTests | % { - Write-Host "[end-to-end-tests.ps1] [$n/$m] Running suite $_" - & $_ - $n += 1 -} - -Write-Host "[end-to-end-tests.ps1] All tests passed." -$LASTEXITCODE = 0 diff --git a/scripts/azure-pipelines/linux/azure-pipelines.yml b/scripts/azure-pipelines/linux/azure-pipelines.yml index b20908f97d..df5cceda6a 100644 --- a/scripts/azure-pipelines/linux/azure-pipelines.yml +++ b/scripts/azure-pipelines/linux/azure-pipelines.yml @@ -30,20 +30,9 @@ jobs: exit 0 displayName: 'Create ${{ variables.VCPKG_DOWNLOADS }}' - task: Bash@3 - displayName: 'Build vcpkg' + displayName: 'Bootstrap vcpkg' inputs: filePath: bootstrap-vcpkg.sh - arguments: '-buildTests' - - bash: toolsrc/build.rel/vcpkg-test - displayName: 'Run vcpkg tests' - env: - VCPKG_DEBUG: 1 - - task: PowerShell@2 - displayName: 'Run vcpkg end-to-end tests' - inputs: - filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1' - arguments: '-Triplet x64-linux -WorkingRoot ${{ variables.WORKING_ROOT }}' - pwsh: true - task: PowerShell@2 displayName: '*** Test Modified Ports and Prepare Test Logs ***' inputs: diff --git a/scripts/azure-pipelines/osx/azure-pipelines.yml b/scripts/azure-pipelines/osx/azure-pipelines.yml index 50bba080fb..52e974c933 100644 --- a/scripts/azure-pipelines/osx/azure-pipelines.yml +++ b/scripts/azure-pipelines/osx/azure-pipelines.yml @@ -30,17 +30,6 @@ jobs: displayName: 'Build vcpkg' inputs: filePath: bootstrap-vcpkg.sh - arguments: '-buildTests' - - bash: toolsrc/build.rel/vcpkg-test - displayName: 'Run vcpkg tests' - env: - VCPKG_DEBUG: 1 - - task: PowerShell@2 - displayName: 'Run vcpkg end-to-end tests' - inputs: - filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1' - arguments: '-Triplet x64-osx -WorkingRoot ${{ variables.WORKING_ROOT }}' - pwsh: true - task: PowerShell@2 displayName: '*** Test Modified Ports and Prepare Test Logs ***' inputs: diff --git a/scripts/azure-pipelines/signing.yml b/scripts/azure-pipelines/signing.yml deleted file mode 100644 index b7a3137d99..0000000000 --- a/scripts/azure-pipelines/signing.yml +++ /dev/null @@ -1,125 +0,0 @@ -# This script is used internally to produce signed vcpkg builds. -# It uses machines / tasks that are not exposed here on GitHub, as -# the hardware on which we allow signing is restricted. - -trigger: none - -variables: - TeamName: vcpkg -jobs: - - job: windows - displayName: "Windows" - dependsOn: - pool: - name: 'VSEng-MicroBuildVS2019' - demands: - - CMAKE - steps: - - task: PoliCheck@1 - inputs: - inputType: 'Basic' - targetType: 'F' - targetArgument: '$(Build.SourcesDirectory)' - result: 'PoliCheck.xml' - - task: CmdLine@2 - displayName: "Build vcpkg with CMake" - inputs: - failOnStderr: true - script: | - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86 - cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" -S toolsrc - ninja.exe -C "$(Build.StagingDirectory)" - - task: MicroBuildSigningPlugin@2 - inputs: - signType: 'real' - feedSource: 'https://devdiv.pkgs.visualstudio.com/DefaultCollection/_packaging/MicroBuildToolset/nuget/v3/index.json' - - task: NuGetToolInstaller@1 - inputs: - versionSpec: 5.7 - - task: NuGetCommand@2 - displayName: 'NuGet Restore MicroBuild Signing Extension' - inputs: - command: 'restore' - restoreSolution: 'scripts/azure-pipelines/windows/signing.signproj' - feedsToUse: 'config' - restoreDirectory: '$(Build.SourcesDirectory)\scripts\azure-pipelines\packages' - - task: MSBuild@1 - displayName: 'Sign vcpkg.exe' - inputs: - solution: 'scripts\azure-pipelines\windows\signing.signproj' - msbuildArguments: '/p:OutDir=$(Build.ArtifactStagingDirectory)\ /p:IntermediateOutputPath=$(Build.StagingDirectory)\' - - task: BinSkim@3 - inputs: - InputType: 'CommandLine' - arguments: 'analyze "$(Build.StagingDirectory)\vcpkg.exe"' - - task: BinSkim@3 - inputs: - InputType: 'CommandLine' - arguments: 'analyze "$(Build.StagingDirectory)\tls12-download.exe"' - - task: PublishBuildArtifacts@1 - displayName: 'Publish vcpkg.exe' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.exe' - ArtifactName: 'Windows' - publishLocation: 'Container' - - task: PublishBuildArtifacts@1 - displayName: 'Publish vcpkg.pdb' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\vcpkg.pdb' - ArtifactName: 'Windows' - publishLocation: 'Container' - - task: PublishBuildArtifacts@1 - displayName: 'Publish tls12-download.exe' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\tls12-download.exe' - ArtifactName: 'Windows' - publishLocation: 'Container' - - task: PublishBuildArtifacts@1 - displayName: 'Publish tls12-download.pdb' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\tls12-download.pdb' - ArtifactName: 'Windows' - publishLocation: 'Container' - - task: MicroBuildCleanup@1 - condition: succeededOrFailed() - displayName: MicroBuild Cleanup - - job: macos_build - displayName: 'MacOS Build' - pool: - vmImage: macOS-10.15 - steps: - - task: CmdLine@2 - displayName: "Build vcpkg with CMake" - inputs: - failOnStderr: true - script: | - cmake -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B "$(Build.StagingDirectory)" -S toolsrc - make -j 8 -C "$(Build.StagingDirectory)" - zip "$(Build.StagingDirectory)/vcpkg.zip" "$(Build.StagingDirectory)/vcpkg" - - task: PublishBuildArtifacts@1 - displayName: "Publish Unsigned MacOS Binary" - inputs: - PathtoPublish: '$(Build.StagingDirectory)/vcpkg.zip' - ArtifactName: 'staging' - publishLocation: 'Container' - - job: macos_sign - displayName: 'MacOS Sign' - dependsOn: macos_build - pool: - name: VSEng-MicroBuildVS2019 - steps: - - checkout: none - - task: DownloadBuildArtifacts@0 - displayName: 'Download Unsigned Binary' - inputs: - artifactName: staging - - task: ms-vseng.MicroBuildTasks.7973a23b-33e3-4b00-a7d9-c06d90f8297f.MicroBuildSignMacFiles@1 - displayName: 'Sign Mac Files' - inputs: - SigningTarget: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip' - SigningCert: 8003 - - task: PublishBuildArtifacts@1 - displayName: 'Publish Signed Binary' - inputs: - PathtoPublish: '$(Build.ArtifactStagingDirectory)\staging\vcpkg.zip' - ArtifactName: 'MacOS' diff --git a/scripts/azure-pipelines/windows/azure-pipelines.yml b/scripts/azure-pipelines/windows/azure-pipelines.yml index 4c46e86a77..c2d74b8bcc 100644 --- a/scripts/azure-pipelines/windows/azure-pipelines.yml +++ b/scripts/azure-pipelines/windows/azure-pipelines.yml @@ -24,34 +24,7 @@ jobs: pwsh: true # Note: D: is the Azure machines' temporary disk. - script: .\bootstrap-vcpkg.bat - displayName: 'Build vcpkg' - - task: PowerShell@2 - displayName: 'Run vcpkg end-to-end tests' - condition: eq('${{ parameters.triplet }}', 'x86-windows') - inputs: - filePath: 'scripts/azure-pipelines/end-to-end-tests.ps1' - arguments: '-Triplet ${{ parameters.triplet }} -WorkingRoot ${{ variables.WORKING_ROOT }}' - pwsh: true - - task: CmdLine@2 - displayName: "Build vcpkg with CMake, with older VS, and Run Tests" - condition: eq('${{ parameters.triplet }}', 'x86-windows') - inputs: - script: | - :: TRANSITION, get these tools on the VMs next time we roll them - .\vcpkg.exe fetch cmake - .\vcpkg.exe fetch ninja - set PATH=${{ variables.VCPKG_DOWNLOADS }}\tools\cmake-3.19.2-windows\cmake-3.19.2-win32-x86\bin;${{ variables.VCPKG_DOWNLOADS }}\tools\ninja-1.10.1-windows;%PATH% - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x86 -host_arch=x86 - rmdir /s /q build.x86.debug > nul 2> nul - cmake.exe -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON -DVCPKG_DEVELOPMENT_WARNINGS=ON -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=ON -B build.x86.debug -S toolsrc - ninja.exe -C build.x86.debug - set VCPKG_DEBUG=1 - build.x86.debug\vcpkg-test.exe - cmake -G "Visual Studio 16 2019" -A Win32 -T v140 -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=OFF -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B build.x86.vs2015 -S toolsrc - cmake --build build.x86.vs2015 - cmake -G "Visual Studio 16 2019" -A Win32 -T v141 -DBUILD_TESTING=OFF -DVCPKG_DEVELOPMENT_WARNINGS=OFF -DVCPKG_WARNINGS_AS_ERRORS=ON -DVCPKG_BUILD_FUZZING=OFF -B build.x86.vs2017 -S toolsrc - cmake --build build.x86.vs2017 - failOnStderr: true + displayName: 'Bootstrap vcpkg' - task: PowerShell@2 displayName: '*** Test Modified Ports and Prepare Test Logs ***' inputs: diff --git a/scripts/azure-pipelines/windows/packages.config b/scripts/azure-pipelines/windows/packages.config deleted file mode 100644 index d48977f796..0000000000 --- a/scripts/azure-pipelines/windows/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/scripts/azure-pipelines/windows/signing.signproj b/scripts/azure-pipelines/windows/signing.signproj deleted file mode 100644 index 9382e0a0e2..0000000000 --- a/scripts/azure-pipelines/windows/signing.signproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - Microsoft400 - - - Microsoft400 - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - - - - diff --git a/scripts/bootstrap.ps1 b/scripts/bootstrap.ps1 index b4c6295c08..e4153aad40 100644 --- a/scripts/bootstrap.ps1 +++ b/scripts/bootstrap.ps1 @@ -1,10 +1,10 @@ [CmdletBinding()] param( $badParam, - [Parameter(Mandatory=$False)][switch]$disableMetrics = $false, [Parameter(Mandatory=$False)][switch]$win64 = $false, [Parameter(Mandatory=$False)][string]$withVSPath = "", - [Parameter(Mandatory=$False)][string]$withWinSDK = "" + [Parameter(Mandatory=$False)][string]$withWinSDK = "", + [Parameter(Mandatory=$False)][switch]$disableMetrics = $false ) Set-StrictMode -Version Latest # Powershell2-compatible way of forcing named-parameters @@ -12,407 +12,48 @@ if ($badParam) { if ($disableMetrics -and $badParam -eq "1") { - Write-Warning "'disableMetrics 1' is deprecated, please change to 'disableMetrics' (without '1')" + Write-Warning "'disableMetrics 1' is deprecated, please change to 'disableMetrics' (without '1')." } else { - throw "Only named parameters are allowed" + throw "Only named parameters are allowed." } } +if ($win64) +{ + Write-Warning "-win64 no longer has any effect; ignored." +} + +if (-Not [string]::IsNullOrWhiteSpace($withVSPath)) +{ + Write-Warning "-withVSPath no longer has any effect; ignored." +} + +if (-Not [string]::IsNullOrWhiteSpace($withWinSDK)) +{ + Write-Warning "-withWinSDK no longer has any effect; ignored." +} + $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition -$withVSPath = $withVSPath -replace "\\$" # Remove potential trailing backslash - -function vcpkgHasProperty([Parameter(Mandatory=$true)][AllowNull()]$object, [Parameter(Mandatory=$true)]$propertyName) -{ - if ($null -eq $object) - { - return $false - } - - return [bool]($object.psobject.Properties | Where-Object { $_.Name -eq "$propertyName"}) -} - -function getProgramFiles32bit() -{ - $out = ${env:PROGRAMFILES(X86)} - if ($null -eq $out) - { - $out = ${env:PROGRAMFILES} - } - - if ($null -eq $out) - { - throw "Could not find [Program Files 32-bit]" - } - - return $out -} - $vcpkgRootDir = $scriptsDir while (!($vcpkgRootDir -eq "") -and !(Test-Path "$vcpkgRootDir\.vcpkg-root")) { Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root" $vcpkgRootDir = Split-path $vcpkgRootDir -Parent } + Write-Verbose "Examining $vcpkgRootDir for .vcpkg-root - Found" -$vcpkgBootstrapPath = "$vcpkgRootDir\toolsrc\windows-bootstrap" +& "$scriptsDir/tls12-download.exe" github.com "/microsoft/vcpkg-tool/releases/download/2021-01-13-768d8f95c9e752603d2c5901c7a7c7fbdb08af35/vcpkg.exe" "$vcpkgRootDir/vcpkg.exe" +Write-Host "" -if (-not (Test-Path $vcpkgBootstrapPath)) +if ($LASTEXITCODE -ne 0) { - Write-Error "Unable to determine vcpkg build directory. '$vcpkgBootstrapPath' does not exist." + Write-Error "Downloading vcpkg.exe failed. Please check your internet connection, or consider downloading a recent vcpkg.exe from https://github.com/microsoft/vcpkg-tool with a browser." throw } -function getVisualStudioInstances() -{ - $programFiles = getProgramFiles32bit - $results = New-Object System.Collections.ArrayList - $vswhereExe = "$programFiles\Microsoft Visual Studio\Installer\vswhere.exe" - if (Test-Path $vswhereExe) - { - $output = & $vswhereExe -prerelease -legacy -products * -format xml - [xml]$asXml = $output - - foreach ($instance in $asXml.instances.instance) - { - $installationPath = $instance.InstallationPath -replace "\\$" # Remove potential trailing backslash - $installationVersion = $instance.InstallationVersion - - $isPrerelease = -7 - if (vcpkgHasProperty -object $instance -propertyName "isPrerelease") - { - $isPrerelease = $instance.isPrerelease - } - - if ($isPrerelease -eq 0) - { - $releaseType = "PreferenceWeight3::StableRelease" - } - elseif ($isPrerelease -eq 1) - { - $releaseType = "PreferenceWeight2::PreRelease" - } - else - { - $releaseType = "PreferenceWeight1::Legacy" - } - - # Placed like that for easy sorting according to preference - $results.Add("${releaseType}::${installationVersion}::${installationPath}") > $null - } - } - else - { - Write-Verbose "Could not locate vswhere at $vswhereExe" - } - - if ("$env:vs140comntools" -ne "") - { - $installationPath = Split-Path -Parent $(Split-Path -Parent "$env:vs140comntools") - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null - } - } - - $installationPath = "$programFiles\Microsoft Visual Studio 14.0" - $clExe = "$installationPath\VC\bin\cl.exe" - $vcvarsallbat = "$installationPath\VC\vcvarsall.bat" - - if ((Test-Path $clExe) -And (Test-Path $vcvarsallbat)) - { - $results.Add("PreferenceWeight1::Legacy::14.0::$installationPath") > $null - } - - $results.Sort() - $results.Reverse() - - return $results -} - -function findAnyMSBuildWithCppPlatformToolset([string]$withVSPath) -{ - $VisualStudioInstances = getVisualStudioInstances - if ($null -eq $VisualStudioInstances) - { - throw "Could not find Visual Studio. VS2015, VS2017, or VS2019 (with C++) needs to be installed." - } - - Write-Verbose "VS Candidates:`n`r$([system.String]::Join([Environment]::NewLine, $VisualStudioInstances))" - foreach ($instanceCandidate in $VisualStudioInstances) - { - Write-Verbose "Inspecting: $instanceCandidate" - $split = $instanceCandidate -split "::" - # $preferenceWeight = $split[0] - # $releaseType = $split[1] - $version = $split[2] - $path = $split[3] - - if ($withVSPath -ne "" -and $withVSPath -ne $path) - { - Write-Verbose "Skipping: $instanceCandidate" - continue - } - - $majorVersion = $version.Substring(0,2); - if ($majorVersion -eq "16") - { - $VCFolder= "$path\VC\Tools\MSVC\" - if (Test-Path $VCFolder) - { - Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\Current\Bin\MSBuild.exe", "v142" - } - } - - if ($majorVersion -eq "15") - { - $VCFolder= "$path\VC\Tools\MSVC\" - if (Test-Path $VCFolder) - { - Write-Verbose "Picking: $instanceCandidate" - return "$path\MSBuild\15.0\Bin\MSBuild.exe", "v141" - } - } - - if ($majorVersion -eq "14") - { - $clExe= "$path\VC\bin\cl.exe" - if (Test-Path $clExe) - { - Write-Verbose "Picking: $instanceCandidate" - $programFilesPath = getProgramFiles32bit - return "$programFilesPath\MSBuild\14.0\Bin\MSBuild.exe", "v140" - } - } - } - - throw "Could not find MSBuild version with C++ support. VS2015, VS2017, or VS2019 (with C++) needs to be installed." -} -function getWindowsSDK( [Parameter(Mandatory=$False)][switch]$DisableWin10SDK = $False, - [Parameter(Mandatory=$False)][switch]$DisableWin81SDK = $False, - [Parameter(Mandatory=$False)][string]$withWinSDK) -{ - if ($DisableWin10SDK -and $DisableWin81SDK) - { - throw "Both Win10SDK and Win81SDK were disabled." - } - - Write-Verbose "Finding WinSDK" - - $validInstances = New-Object System.Collections.ArrayList - - # Windows 10 SDK - function CheckWindows10SDK($path) - { - if ($null -eq $path) - { - return - } - - $folder = (Join-Path $path "Include") - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win10sdkVersions = @(Get-ChildItem $folder | Where-Object {$_.Name -match "^10"} | Sort-Object) - [array]::Reverse($win10sdkVersions) # Newest SDK first - - foreach ($win10sdk in $win10sdkVersions) - { - $win10sdkV = $win10sdk.Name - $windowsheader = "$folder\$win10sdkV\um\windows.h" - if (!(Test-Path $windowsheader)) - { - Write-Verbose "$windowsheader - Not Found" - continue - } - Write-Verbose "$windowsheader - Found" - - $ddkheader = "$folder\$win10sdkV\shared\sdkddkver.h" - if (!(Test-Path $ddkheader)) - { - Write-Verbose "$ddkheader - Not Found" - continue - } - - Write-Verbose "$ddkheader - Found" - $win10sdkVersionString = $win10sdkV.ToString() - Write-Verbose "Found $win10sdkVersionString" - $validInstances.Add($win10sdkVersionString) > $null - } - } - - Write-Verbose "`n" - Write-Verbose "Looking for Windows 10 SDK" - $regkey10 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue - $regkey10Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot10' -ErrorAction SilentlyContinue - if (vcpkgHasProperty -object $regkey10 "KitsRoot10") { CheckWindows10SDK($regkey10.KitsRoot10) } - if (vcpkgHasProperty -object $regkey10Wow6432 "KitsRoot10") { CheckWindows10SDK($regkey10Wow6432.KitsRoot10) } - CheckWindows10SDK("$env:ProgramFiles\Windows Kits\10") - CheckWindows10SDK("${env:ProgramFiles(x86)}\Windows Kits\10") - - # Windows 8.1 SDK - function CheckWindows81SDK($path) - { - if ($null -eq $path) - { - return - } - - $folder = "$path\Include" - if (!(Test-Path $folder)) - { - Write-Verbose "$folder - Not Found" - return - } - - Write-Verbose "$folder - Found" - $win81sdkVersionString = "8.1" - Write-Verbose "Found $win81sdkVersionString" - $validInstances.Add($win81sdkVersionString) > $null - } - - Write-Verbose "`n" - Write-Verbose "Looking for Windows 8.1 SDK" - $regkey81 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue - $regkey81Wow6432 = Get-ItemProperty -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows Kits\Installed Roots\' -Name 'KitsRoot81' -ErrorAction SilentlyContinue - if (vcpkgHasProperty -object $regkey81 "KitsRoot81") { CheckWindows81SDK($regkey81.KitsRoot81) } - if (vcpkgHasProperty -object $regkey81Wow6432 "KitsRoot81") { CheckWindows81SDK($regkey81Wow6432.KitsRoot81) } - CheckWindows81SDK("$env:ProgramFiles\Windows Kits\8.1") - CheckWindows81SDK("${env:ProgramFiles(x86)}\Windows Kits\8.1") - - Write-Verbose "`n`n`n" - Write-Verbose "The following Windows SDKs were found:" - foreach ($instance in $validInstances) - { - Write-Verbose $instance - } - - # Selecting - if ($withWinSDK -ne "") - { - foreach ($instance in $validInstances) - { - if ($instance -eq $withWinSDK) - { - return $instance - } - } - - throw "Could not find the requested Windows SDK version: $withWinSDK" - } - - foreach ($instance in $validInstances) - { - if (!$DisableWin10SDK -and $instance -match "10.") - { - return $instance - } - - if (!$DisableWin81SDK -and $instance -match "8.1") - { - return $instance - } - } - - throw "Could not detect a Windows SDK / TargetPlatformVersion" -} - -$msbuildExeWithPlatformToolset = findAnyMSBuildWithCppPlatformToolset $withVSPath -$msbuildExe = $msbuildExeWithPlatformToolset[0] -$platformToolset = $msbuildExeWithPlatformToolset[1] -$windowsSDK = getWindowsSDK -withWinSDK $withWinSDK - -$disableMetricsValue = "0" -if ($disableMetrics) -{ - $disableMetricsValue = "1" -} - -$platform = "x86" -$vcpkgReleaseDir = "$vcpkgBootstrapPath\msbuild.x86.release" -if($PSVersionTable.PSVersion.Major -le 2) -{ - $architecture=(Get-WmiObject win32_operatingsystem | Select-Object osarchitecture).osarchitecture -} -else -{ - $architecture=(Get-CimInstance win32_operatingsystem | Select-Object osarchitecture).osarchitecture -} -if ($win64) -{ - if (-not $architecture -like "*64*") - { - throw "Cannot build 64-bit on non-64-bit system" - } - - $platform = "x64" - $vcpkgReleaseDir = "$vcpkgBootstrapPath\msbuild.x64.release" -} - -if ($architecture -like "*64*") -{ - $PreferredToolArchitecture = "x64" -} -else -{ - $PreferredToolArchitecture = "x86" -} - -$arguments = ( -"`"/p:VCPKG_VERSION=unknownhash`"", -"`"/p:VCPKG_BASE_VERSION=2021-01-13`"", # Note: This duplicate date version will be short lived. See https://github.com/microsoft/vcpkg/pull/15474 -"/p:Configuration=Release", -"/p:Platform=$platform", -"/p:PlatformToolset=$platformToolset", -"/p:TargetPlatformVersion=$windowsSDK", -"/p:PreferredToolArchitecture=$PreferredToolArchitecture", -"/verbosity:minimal", -"/m", -"/nologo", -"`"$vcpkgBootstrapPath\vcpkg.vcxproj`"") -join " " - -function vcpkgInvokeCommandClean() -{ - param ( [Parameter(Mandatory=$true)][string]$executable, - [string]$arguments = "") - - Write-Verbose "Clean-Executing: ${executable} ${arguments}" - $scriptsDir = split-path -parent $script:MyInvocation.MyCommand.Definition - $cleanEnvScript = "$scriptsDir\cleanEnvironmentHelper.ps1" - $tripleQuotes = "`"`"`"" - $argumentsWithEscapedQuotes = $arguments -replace "`"", $tripleQuotes - $command = ". $tripleQuotes$cleanEnvScript$tripleQuotes; & $tripleQuotes$executable$tripleQuotes $argumentsWithEscapedQuotes" - $arg = "-NoProfile", "-ExecutionPolicy Bypass", "-command $command" - - $process = Start-Process -FilePath powershell.exe -ArgumentList $arg -PassThru -NoNewWindow - Wait-Process -InputObject $process - $ec = $process.ExitCode - Write-Verbose "Execution terminated with exit code $ec." - return $ec -} - -# vcpkgInvokeCommandClean cmd "/c echo %PATH%" -Write-Host "`nBuilding vcpkg.exe ...`n" -$ec = vcpkgInvokeCommandClean $msbuildExe $arguments - -if ($ec -ne 0) -{ - Write-Error "Building vcpkg.exe failed. Please ensure you have installed Visual Studio with the Desktop C++ workload and the Windows SDK for Desktop C++." - throw -} - -Write-Host "`nBuilding vcpkg.exe... done.`n" - if ($disableMetrics) { Set-Content -Value "" -Path "$vcpkgRootDir\vcpkg.disable-metrics" -Force @@ -433,9 +74,3 @@ or by setting the VCPKG_DISABLE_METRICS environment variable. Read more about vcpkg telemetry at docs/about/privacy.md "@ } - -Write-Verbose "Placing vcpkg.exe in the correct location" - -Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe" - -Remove-Item "$vcpkgReleaseDir" -Force -Recurse -ErrorAction SilentlyContinue diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index b7d889f9ec..2188b8af71 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -276,11 +276,29 @@ else fi # Do the build -buildDir="$vcpkgRootDir/toolsrc/build.rel" -rm -rf "$buildDir" -mkdir -p "$buildDir" +vcpkgToolReleaseTag="2021-01-13-768d8f95c9e752603d2c5901c7a7c7fbdb08af35" +vcpkgToolReleaseSha="99c9949637f83bf361ee23557edc889e2865c2105c45306c39c40855a3e1440e2f6fb5ec59e95176fca61eff33929462d23c7b49feb1975f24adb8ca443a98a6" +vcpkgToolReleaseTarball="$vcpkgToolReleaseTag.tar.gz" +vcpkgToolUrl="https://github.com/microsoft/vcpkg-tool/archive/$vcpkgToolReleaseTarball" +baseBuildDir="$vcpkgRootDir/buildtrees/_vcpkg" +buildDir="$baseBuildDir/build" +tarballPath="$downloadsDir/$vcpkgToolReleaseTarball" +srcBaseDir="$baseBuildDir/src" +srcDir="$srcBaseDir/vcpkg-tool-$vcpkgToolReleaseTag" -(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 +if [ -e "$tarballPath" ]; then + vcpkgCheckEqualFileHash "$vcpkgToolUrl" "$tarballPath" "$vcpkgToolReleaseSha" +else + echo "Downloading vcpkg tool sources" + vcpkgDownloadFile "$vcpkgToolUrl" "$tarballPath" "$vcpkgToolReleaseSha" +fi + +echo "Building vcpkg-tool..." +rm -rf "$baseBuildDir" +mkdir -p "$buildDir" +vcpkgExtractArchive "$tarballPath" "$srcBaseDir" + +(cd "$buildDir" && CXX="$CXX" "$cmakeExe" "$srcDir" -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" diff --git a/scripts/cleanEnvironmentHelper.ps1 b/scripts/cleanEnvironmentHelper.ps1 deleted file mode 100644 index fa5fe869dd..0000000000 --- a/scripts/cleanEnvironmentHelper.ps1 +++ /dev/null @@ -1,52 +0,0 @@ -# Capture environment variables for the System and User. Also add some special/built-in variables. -# These will be used to synthesize a clean environment -$specialEnvironmentMap = @{ "SystemDrive"=$env:SystemDrive; "SystemRoot"=$env:SystemRoot; "UserProfile"=$env:UserProfile; "TMP"=$env:TMP } # These are built-in and not set in the registry -$machineEnvironmentMap = [Environment]::GetEnvironmentVariables('Machine') # HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment -$userEnvironmentMap = [Environment]::GetEnvironmentVariables('User') # HKEY_CURRENT_USER\Environment - -# Identify the keySet of environment variable names -$nameSet = ($specialEnvironmentMap.Keys + $machineEnvironmentMap.Keys + $userEnvironmentMap.Keys) | Sort-Object | Select-Object -Unique - -# Any environment variable in the $nameSet should be restored to its original value -foreach ($name in $nameSet) -{ - if ($specialEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $specialEnvironmentMap[$name], 'Process') - continue; - } - - # PATH needs to be concatenated as it has values in both machine and user environment. Any other values should be set. - if ($name -eq 'path') - { - $pathValuePartial = @() - # Machine values before user values - $pathValuePartial += $machineEnvironmentMap[$name] -split ';' - $pathValuePartial += $userEnvironmentMap[$name] -split ';' - $pathValue = $pathValuePartial -join ';' - [Environment]::SetEnvironmentVariable($name, $pathValue, 'Process') - continue; - } - - if ($userEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $userEnvironmentMap[$name], 'Process') - continue; - } - - if ($machineEnvironmentMap.ContainsKey($name)) - { - [Environment]::SetEnvironmentVariable($name, $machineEnvironmentMap[$name], 'Process') - continue; - } - - throw "Unreachable: Unknown variable $name" -} - -# Any environment variable NOT in the $nameSet should be removed -$processEnvironmentMap = [Environment]::GetEnvironmentVariables('Process') -$variablesForRemoval = $processEnvironmentMap.Keys | Where-Object {$nameSet -notcontains $_} -foreach ($name in $variablesForRemoval) -{ - [Environment]::SetEnvironmentVariable($name, $null, 'Process') -} diff --git a/scripts/e2e_ports/overlays/vcpkg-requires-current-date/portfile.cmake b/scripts/e2e_ports/overlays/vcpkg-requires-current-date/portfile.cmake deleted file mode 100644 index 68dc779a84..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-requires-current-date/portfile.cmake +++ /dev/null @@ -1,2 +0,0 @@ -vcpkg_minimum_required(VERSION ${VCPKG_BASE_VERSION}) -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/scripts/e2e_ports/overlays/vcpkg-requires-current-date/vcpkg.json b/scripts/e2e_ports/overlays/vcpkg-requires-current-date/vcpkg.json deleted file mode 100644 index 48debf1e76..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-requires-current-date/vcpkg.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "vcpkg-requires-current-date", - "version-string": "1.0.0", - "description": "A test port that verifies that vcpkg_minimum_required is inclusive by using the current base version value.", - "homepage": "" -} diff --git a/scripts/e2e_ports/overlays/vcpkg-requires-future-date/portfile.cmake b/scripts/e2e_ports/overlays/vcpkg-requires-future-date/portfile.cmake deleted file mode 100644 index b68e53e95c..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-requires-future-date/portfile.cmake +++ /dev/null @@ -1,2 +0,0 @@ -vcpkg_minimum_required(VERSION 2999-12-31) -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/scripts/e2e_ports/overlays/vcpkg-requires-future-date/vcpkg.json b/scripts/e2e_ports/overlays/vcpkg-requires-future-date/vcpkg.json deleted file mode 100644 index f60901998f..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-requires-future-date/vcpkg.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "vcpkg-requires-future-date", - "version-string": "1.0.0", - "description": "A test port that requires a vcpkg version from an impossibly far future.", - "homepage": "" -} diff --git a/scripts/e2e_ports/overlays/vcpkg-requires-old-date/portfile.cmake b/scripts/e2e_ports/overlays/vcpkg-requires-old-date/portfile.cmake deleted file mode 100644 index 5a4fbf4213..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-requires-old-date/portfile.cmake +++ /dev/null @@ -1,2 +0,0 @@ -vcpkg_minimum_required(VERSION 2020-01-12) -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/scripts/e2e_ports/overlays/vcpkg-requires-old-date/vcpkg.json b/scripts/e2e_ports/overlays/vcpkg-requires-old-date/vcpkg.json deleted file mode 100644 index 31e6fb62ff..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-requires-old-date/vcpkg.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "vcpkg-requires-old-date", - "version-string": "1.0.0", - "description": "A test port that requires a vcpkg version from before vcpkg_minimum_required's introduction.", - "homepage": "" -} diff --git a/scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/portfile.cmake b/scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/portfile.cmake deleted file mode 100644 index 571ae3b7ab..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/portfile.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - -vcpkg_test_cmake(args args args) diff --git a/scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/vcpkg.json b/scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/vcpkg.json deleted file mode 100644 index 9f34e058d6..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-uses-test-cmake/vcpkg.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "vcpkg-uses-test-cmake", - "version-string": "1.0.0", - "description": "A test port that uses the deprecated function vcpkg_test_cmake.", - "homepage": "" -} diff --git a/scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/portfile.cmake b/scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/portfile.cmake deleted file mode 100644 index 9207d30b19..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/portfile.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) - -include(vcpkg_common_functions) diff --git a/scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/vcpkg.json b/scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/vcpkg.json deleted file mode 100644 index 7c16ffe821..0000000000 --- a/scripts/e2e_ports/overlays/vcpkg-uses-vcpkg-common-functions/vcpkg.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "vcpkg-uses-vcpkg-common-functions", - "version-string": "1.0.0", - "description": "A test port that uses the deprecated file vcpkg_common_functions.", - "homepage": "" -} diff --git a/scripts/e2e_ports/vcpkg-internal-e2e-test-port/portfile.cmake b/scripts/e2e_ports/vcpkg-internal-e2e-test-port/portfile.cmake deleted file mode 100644 index 065116c276..0000000000 --- a/scripts/e2e_ports/vcpkg-internal-e2e-test-port/portfile.cmake +++ /dev/null @@ -1 +0,0 @@ -set(VCPKG_POLICY_EMPTY_PACKAGE enabled) diff --git a/scripts/e2e_ports/vcpkg-internal-e2e-test-port/vcpkg.json b/scripts/e2e_ports/vcpkg-internal-e2e-test-port/vcpkg.json deleted file mode 100644 index a25da6d236..0000000000 --- a/scripts/e2e_ports/vcpkg-internal-e2e-test-port/vcpkg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "vcpkg-internal-e2e-test-port", - "version-string": "1.0.0" -} diff --git a/scripts/e2e_ports/versions/baseline.json b/scripts/e2e_ports/versions/baseline.json deleted file mode 100644 index 2413f8afc6..0000000000 --- a/scripts/e2e_ports/versions/baseline.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "default": { - "vcpkg-internal-e2e-test-port": { "baseline": "1.0.0" } - } -} diff --git a/scripts/e2e_ports/versions/v-/vcpkg-internal-e2e-test-port.json b/scripts/e2e_ports/versions/v-/vcpkg-internal-e2e-test-port.json deleted file mode 100644 index ce7698ebb8..0000000000 --- a/scripts/e2e_ports/versions/v-/vcpkg-internal-e2e-test-port.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "versions": [ - { - "version-string": "1.0.0", - "git-tree": "1dc3e42a3c0cafe2884d379af4399273238b986e" - } - ] -} diff --git a/scripts/testing/env-passthrough/passthrough.cmake b/scripts/testing/env-passthrough/passthrough.cmake deleted file mode 100644 index 071b8381ea..0000000000 --- a/scripts/testing/env-passthrough/passthrough.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(VCPKG_TARGET_ARCHITECTURE x64) -set(VCPKG_CRT_LINKAGE dynamic) -set(VCPKG_LIBRARY_LINKAGE dynamic) - -set(VCPKG_ENV_PASSTHROUGH _VCPKG_TEST_TRACKED _VCPKG_TEST_TRACKED2) -set(VCPKG_ENV_PASSTHROUGH_UNTRACKED _VCPKG_TEST_UNTRACKED _VCPKG_TEST_UNTRACKED2) diff --git a/scripts/testing/integrate-install/NoProps.vcxproj b/scripts/testing/integrate-install/NoProps.vcxproj deleted file mode 100644 index 5b75d09615..0000000000 --- a/scripts/testing/integrate-install/NoProps.vcxproj +++ /dev/null @@ -1,145 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} - Project1 - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - \ No newline at end of file diff --git a/scripts/testing/integrate-install/Project1.vcxproj b/scripts/testing/integrate-install/Project1.vcxproj deleted file mode 100644 index a8896fe29d..0000000000 --- a/scripts/testing/integrate-install/Project1.vcxproj +++ /dev/null @@ -1,146 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} - Project1 - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - \ No newline at end of file diff --git a/scripts/testing/integrate-install/Source.cpp b/scripts/testing/integrate-install/Source.cpp deleted file mode 100644 index 24a84e4d7f..0000000000 --- a/scripts/testing/integrate-install/Source.cpp +++ /dev/null @@ -1,6 +0,0 @@ -#include - -int main() { - zlibVersion(); - return 0; -} \ No newline at end of file diff --git a/scripts/testing/integrate-install/VcpkgTriplet.vcxproj b/scripts/testing/integrate-install/VcpkgTriplet.vcxproj deleted file mode 100644 index 883fc8ec1a..0000000000 --- a/scripts/testing/integrate-install/VcpkgTriplet.vcxproj +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} - VcpkgUseStatic - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - x86-windows-static - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreaded - - - Console - true - true - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - \ No newline at end of file diff --git a/scripts/testing/integrate-install/VcpkgTriplet2.vcxproj b/scripts/testing/integrate-install/VcpkgTriplet2.vcxproj deleted file mode 100644 index d3352e195b..0000000000 --- a/scripts/testing/integrate-install/VcpkgTriplet2.vcxproj +++ /dev/null @@ -1,149 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} - VcpkgUseStatic - 10.0 - x86-windows-static - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreaded - - - Console - true - true - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - \ No newline at end of file diff --git a/scripts/testing/integrate-install/VcpkgUseStatic.vcxproj b/scripts/testing/integrate-install/VcpkgUseStatic.vcxproj deleted file mode 100644 index 28c4fc7158..0000000000 --- a/scripts/testing/integrate-install/VcpkgUseStatic.vcxproj +++ /dev/null @@ -1,151 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} - VcpkgUseStatic - 10.0 - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - true - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreaded - - - Console - true - true - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - \ No newline at end of file diff --git a/scripts/testing/integrate-install/VcpkgUseStatic2.vcxproj b/scripts/testing/integrate-install/VcpkgUseStatic2.vcxproj deleted file mode 100644 index 98beaee4b1..0000000000 --- a/scripts/testing/integrate-install/VcpkgUseStatic2.vcxproj +++ /dev/null @@ -1,149 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - {5AFB7AF5-D8FC-4A86-B0D2-3BBD039ED03A} - VcpkgUseStatic - 10.0 - true - - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - Application - true - v142 - Unicode - - - Application - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreadedDebug - - - Console - true - - - - - Level3 - true - _DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - MultiThreaded - - - Console - true - true - true - - - - - Level3 - true - true - true - NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - - - Console - true - true - true - - - - - - - - \ No newline at end of file diff --git a/scripts/tls12-download.exe b/scripts/tls12-download.exe new file mode 100644 index 0000000000000000000000000000000000000000..3eff1dd4e031b5f8074f027cac4d08e91f59dcc1 GIT binary patch literal 18312 zcmeHu2UwFyxA2=nuL>wCN+?kjfj0$G0Hqfdh_r};7)c-?B$z_8(L^y~#ol1mwXTY+ zWvw9g-h080z2VBP?B+l723XYHZ@>HB`~Ba&_xXos+L<$F&YU?jXXd;iV&oi*f?*gH zqE?GxyCFxxk4XP zEu*E&XhBgiv@E$;;%;VU?A%70u}4Tz-{J|{!w$!mm_DjPXwR`RPyr!z*@c0;{EiTas2}P~ zNHXPsh~`cR2+?!wgak!D3=8-Y^8ai9DhUja7iw*SXnvSxqO+yut+WY>!loQOI1NkSaR4_dYGs^Bx;7hEf?rD z1wl1=^y$;PeF{lfQ>p=mRa0?4jCHuY)R_w)Vbe?4x)~p}HZFj!X(`caElM9!FbtTr z7HDk-A_lcKVuCk|(i6~9GSS(Zs_HL2PmHJ3jkg==X|iS}L6mj6={`^`I*bNwh|!EN zjnhb}@tSNyX^Ks-G zZQ3cY7o-ybLu-Q*9I3d{HK@Y@;0rqzyx(-0i5rMGj92DAwbr^~u ztQU4VvHG5Zeil=ok}-_+>HwMp@MhU2%EbgOESVIjVHsq!b{XUttqmK-)?6?745Atg zJu{FFSjWXnO`Q;Dd8oAs=nS0t%A&MCLZE^)U4T6o%n)Xf5gVtqDFm#kbrz-81Oe$@ z7#pb2pk+F=l*3d|D+yYqa7v<)b>j?_&Vf;2NhSiCrU?!46#DAgbt%wLK_lvajc5Wu zW*guF0RVOeB5A?2FacETpn`*}k!nh<;GlyZ*=;>GLXRR?^5f8KQ3@-7N&TGB8s(Eg zyu+OBDpbzHSal_b4O4;Zps6R+R=d#w2;cw&33%aTVUO)TbNck@lGo%<_v@ciDyZ`) zb*{%t>haWabInQU(g@3sB-JMQK2R(rY7sh_}FPzCW#y?{4h${A!j8ss&XjKpiFV+J^i(Ih&XY8v8M zKd16o7NzR}yTXqgl3KzAmZ$z~QMwQyal)eC(PhnIng&tJbhbttBt8aI#tsIA(Z&lP z#K#CgwP*m*v`p2i#tLCW+X$cvPz*BENeEadhv{&2xG)W_rZ-YHn3*l;8EBJ07$2v- z1TB4BCpz1zpChBuMraryLW5p%(&$kQO+Nr%gk0N`FXf3Q4y%D=7Z3Z$RtQ$d1-40# z_MO!ewe@__Kh?s%6s89E(ZAncCtyq<>;e)^Mj{hES~@yLv~+YdXz4CQI*>?lB4raPmq?Ldv~)ir4I)w`N-Z79K}$zM(bCZl z(bCbL*3uJ+)R{*+Pf7v zEca|dsc$o+sWWY8(2zRQ%$mr0za@ZrFNuuaL}YG{AX`3L&lXTL!Psh3BB!plguEiy zaJ3z(Prco$)gIFu0jMPSt458ht)X^I&k$0?_c1+Fq7`hio^4wxgF0ed9d@kH4(h-= z7)4aqtw#AUy%wm~H$okW7S*MX;LK{e4@!FiO+3S}3H53df}KtXKZ6P*A!s5D|6dE? z5eVTwHg#aKd^(!FZe|AUGb?&Y)6K@^-#44aznx9VBvUNMxMY$grlyuiOfjgN=NM>$ zO~cBAO(FAJjTX9XQQK!)B5B2508*4IpU}gg{KtMf1gE{`r6$-=qf?PDN_+hJ z`e8p&A#pwAdeXZ-mvoxYBS8A5NiV}6HdInW2f=SJ>`Q!|S$-I%>K3o@L?z8xV%Jt8 z=B_4;{tMD@7WnC!A`CV4uEC~m7%)`Qr0XH?;~gyi33B&ukiTL2 zEAnj6y>B}Gv-9Xgix+GOC))KSI7HEGS#?FfRQ2-1EEd!?z~21d9JckxuwMsY*juR<<{SO;-4#HA3YLsURS0f`>PIxr(u=)MF2$MPV4`KN<3Feb*r*qA5gg>f)0 z#>4!)6Ka6V>+8AF~+(2@d%3d_daF)=X`$d8~k4yd3} z5UoG@4}@9>K`9G3Q(+O%ri4Ecj3oi?5GNv_i?|m<4UM6K`Jiz@oNXgR0YY3yKR&dp zppOzm5^{r{x{)&>7eUP(sO3SVfuy2fOn;bjB-EloZo{A!3-x#?yMZ)NEezVCfPO4M zLZEFJwCUy?^cCfHxwcC|3DWU^KNM)tdk~~3gaNHspdN!ILmCa#M_>s6_W`cuZL2g0 z>NG-nN;jFbfrMBg1k42d#+=%L14Tpz$zQ1wcjESVDe6zz+n7 z1RyF%L!b@G6~X_Jv^+qH?t}vj=@Ob@7~rEdj)I8B`WhYsP!-YIu0MeCRo_5@R~cX; zEkhv`<`Mf1Ui%o)fH@vC3F(Ip|4Uxbm@-(~zr#cADG<{^ViE#d39~?QQ$ihuFX;{^ z##DgB!=N2$57J&G;C;RJU+OB-Y(!B(jDvOxlDrD2DPSy}Hn(d5!c-BfqK1-gWxwVF z@r_0gBJe~6pJ;VEucVGAMBTkjKhf=T>2GdO}&y{7$MPm1C@mL)JaK2$EqM)zK2;Z{< z2#fGXJ7=Nofi^PXyLL}UPGx6L1gZp>A>{5jo|2k|=C5-_yQih5i$THGLw$rEw72=I zF_1eI;S+V|K#@`vsun54@u@1&*i4DiAKIvYgA)iiXx;N*f^BpP3JSzyVR*uC?}O;; zcw|Bm+t*L04{b0Of}ICgCFE@|Hi99Wb{-b54d#Vl=*S@E*XBnzggUwwyN^|(?SuKW z**sLXgTp+NrlXDOC`2OLNdrH9Cp-nf!~pxV@ZZs%_r-+ivM`k@J1Scu18KC?0yE`G zNtj3`&V(b!r~@jO$s{RoxVg7Oq9r165c*ibX@|r}R8iTgbUA2Mzjhd+9W5EJmMEbw zyB!)Mk%>E?jCN?WBt?>*BZ-zMv*j`+j6SfvWw=_R$Pa@7B?=`b437+pjTN|yGc&Qv z@;D1=UOd`a*5k{~qCtV?zWl3bJc#$F3+o~5QlM)&x4$e!F5IO^mXaG#E2Ws?}&C@C2$~FM(>|1kh<1R70U14yF>B zvO)wyp&brhF}M?gjrPN^k%06_*MRwmluAj~*vx!dURI_|>FcOg$oR?>sU%CJbjwOl zQOK3@RFzwbJc}<#WlRsK&> zW9j-qPo*S94M%G}L5BvxN1-zk60ty$o&yI(nnc;r*tt1454s{FGfa{r$)shX)Ynm@ z4437|$4L~9GYW75#w$D>`I zg9QEp|Dd4o$j}iZ+6w=fI&#$>hIP}!Epa-|!H45QJO!VK7vT%=)p#v_3V(pN;9A^@ z5ynVoXc%)DOBw4KhZvU_uNh`cI@6UooH>rEVa{W2W!5p@GtF31RvxR6HI21`wTbl> z9_HQHz1Xg77MssbWT&we>`CnD?D_1K><#Q6*$3Gt*;G#xPis$m&jFrn&t%W@o)0|V zdA4|(d)a#Nz5KnzUU$46dOh=ciwcvK=in&?bJnj_kD(+hDCTQ@bmbS`KA0B{5kwZ{FVH*{LTDY{vLik z{{;U6{|5gN{~7-c{};ZKH`9Bhx5!)Ot@1ALF7z(*p6NZ$`+#?Y_YLp6-k-fOA9EjD zA15ES56>soN92?0Q{*$tXTDFZPlL~KpQ}ENJ}-QkDGMV>C{!~1 zqy|saH+I!0QAx!dGKpFhi4ViOcY;{pMidfOMg5Lkh~bQ{`ci3S9}hWie>$JTPG6Ab zk>*$!Yg?*R(KawF|;xkij>lHS(-{NV_4$m2xwqs5G@gB z$z@_jAKVT>jIC@U+D{}}pj?qHSBTKYXSm>fQ9H%TzH_@+LW@aHlL1wlAkd%2#2E~{ zPj@pWjVv=KLLBZNlib)o*)+A$cF^Pno z-F3o5S^Fuf*4VM9``^qDQoX3|&L?_dSSp6h+KcYV{^+WJz* zo%O*7j*l{&mAOBsLfkU8&qq%~kA4@@UOaZNxSg{n;*R@Z?m-i^*L}f^i{*!>swR!< z;@SIVmR_X$#=t%LFD?u`_bkkKEi`_YN!T4p!D9dtACaTj`Oa$n*ey0_9@R zVNhSBy~!wX!#Qp^*B#n%QTv=pBx)QUgAZ@7fBMX(~s^`oSudeoh{*JgR*B2uEdNN`i;%4o8|MHjpFkS9CHc{g^Y{) ze|^C?li+);V21itB>C}*gU_GlY``4l_R+CvTQxnyT)eZ(F4xgkT^qeku=4QkIgJnEo*E|2a?pK}K{SRj@}PRlY{x1zfNfBn4qAM#h$Dw7+J z7oRyvA7k|>Y98-$!11IjzeO>PKJA>~WiseiUwUjtwfWsC89^hMkCtiDUsu-OUqyPj z{?2uiG}|?7jV7Zr z7{#Lk)Hm_W z6;5-sB`H?@|Jc3Ja`-uGAn12`YI+Jhp=thVl~j&ymmNj`OaTYyGI3A1Kp-RFMN}C$ zs{Y%JR5AHmb3jJsfDGmU_S~kozbY*4+<&+(+gNNF!QS(J=Lm;Y0lfx{dp1(AakoCV zCpCP}lm^p2cR1sYcD-)$mV0Q4{7teDSo&m1CSUx2_Cd{!BXh;=N@t z+l>b{Y`w9;bxVQK)@utBPLAoR_bfH1i5cCutH;w#hJtgoLA#Q!A9kmxH%UL7%KE@h ztnStvvZs+N-YgS)=6zq4V&QhlZ+^?ey9Q=g67$!F_kU`3pvo%uK&9`S&ktQkTG~g% zyL?xmXza@06+Zg@!hs(no%mm6xnCocL`sSJpBPZ>5{|HLD7eI2nRb; z-d-pe<#EO7VRn+m@Q~cv7VQ4M&E(?bTXiKhaV zjf$tv_YQ_EIr8R^o$yvk#mk6reBGv5_g;=#wYBxmw$umpi;5<^y83G9)A0W5tX#fd zHz}>~$&9gi$=f|juL+kY9?W%ddG{)-!DaTq*?yd;`ukIZ$`2b2J92q#poeO~Cs|7# zZNxyUq%jMY4vJ!x-rP35``wk1%?r2f3#rOne6jKB^qD5@=I|Am!)LgqzERsP&xS;W zix}3){{5*j>e11`noKqAV+`MQ)bQ0M5c9`P&~a};MP$lwi;lBj52t_$_`=L7-1ub1 zoWP%~^&;;-Uw4dg!Ks{$k3>D}sbGolsH%vnp=IH1RtT)sw`Pv8aoGy+Xr<^Z5$s#o zwXj(`j9oI$N@g+%V>i0pxPh^Y#szp}dmW5jz&|o}9x3gX?jO)s;YF(u^E7JFBD|;) zFPhsSBzFp4RDus~AC64w#`;IYA>%EUrzkzL73o`!u>i3ka2b&CapJo zn3KSVL-dI=nfR!KK6IwQr<>%C4=j?7&tvYi-d`Q4g!N5(U$%B}V{Cp;_e}&UtxH@MEsikvHF}^e?Rb0pXfNu4d;Z7FU0&anc)VQnb9Lgv>)6%mko^fC z7OgcJ8fLkq(EdEu|47ZUwS$9m`*2s)4;m4IN2gmIiy6C|R zbzaYx&pAu-ZHH>F);dYmPqzNrs(E2j_&nWvYb*YWI&9Xxd+Mx|xxN=x#79OQEEGCc z=XGH^6uj{_t{MD!{pmGH_0`jt3CG7rh6UFJoLH7K%D6CW+;91->i1`5Wt@msTA39H z&M=B?((q!N6nOsOMGOAjhU+h1fSn$tRYhBHIDp#TghmvGX~!iV9;xuo`{T)K!Z3&X z=O1+&+~bdqRE8s!W_m2tbfL<4&kj?U!}#TEj#~p18}T#SyqB}}EFRb$tiS_0bvI?O zab}fuVORKujy4+l{;Y(Uim9r57TW&Rp6K~EQ~l^mi%E&2 zyZrdD&isSow99NJeSXB|T{h${{G9n7%kQVU2k84{zbm_{ktU!1tbe3mb?oBq5wouA zZ_l25Nq%Uv&*hJ!GDZc_Cj1^}t_7Cho+u^-fo%Q2r1^k0w~;PQ zFs6|H#5qxTb&Kol?fte(L!b0q;=4e&YeCAsE_Y|Fs6FMNIM6zKCRu+>kK50tOt!UR z;_$#{;w-o)da@brUTn{iIJJ;WYOX4}yr$>^UUc?faxMK2JSzL*&R}`q{n=w-8`Ma@MA;Anf?u76tR(5~fbkWBXw-}WuE1MQ0QRJkjNUDm> zgYaVNM{vvB>ExDibC2*pnId6Tq02eRt+P@ix6H(Ui4fXmMzQMsryRFAWpLz_VelAC z1`nRMo;bVBDZ}8jRsYwm5$O207yQoto(-akW_37!aWH#VZP@Oa)4DQ}%Np;vj5VeE zZQZb_@Cu%=>8kS$yXc2^ye9~&C$ruPkA+Rr4Bc{#mbQLC1%GIH7wcQ`O732TJk;)` z|J&7izm~K*Wmh$fo;PzX&FeRZ^WUDB#DZ)H&lO%miptj|S zmH&N<4WhB{q_hLaoPT`F&@@maE^3cI|V&VN=ewmAP1l(OkBk zzyG7Yd{Z5pvj3X(q!m*#DV2NumRBvW8Fg()YVPB016DlD+Z|+cszIRcUgk6^?Ab7> z$&RNp$DM3EMp3OFx$oixQ=^N6SCzH0AF0RuUU{$mg4+uu)xFbo_C}_7VgSjZCDMF` z)+6u$`~8ZtGhf_FucYu3XE5e`2%Io6q}LIabmY{mI6Pi=D~-az{Za+)mk!^^KX)sI zJq9}rloh#OaKin#(v6uBwCPFD5$@YyZ(@BFtk578U#*qVN(m+WYu-fX3|U}DCV zgrI?;oQj)wM9U11O8d`@rcSOj4y7pdj!(Q;nia!Zo|HPPlG=3K>!Cj7wcql9Iyjhv{>fv{Xe56ntp7gF2;Jd_gZBZ>KbDuL zCp!E*byYU1{+o~HzdfmXo9)Z(GJ{Wh*=n`ux{i8l6Vs2%u=nrPb3yO3Mpm;XitvOQJjmkRnCYdlfu`3Yc5@AD1MbY< zd{v1H`xdVbHaq|PV`$NtgU(}^BgTZh9}!x{EbXHbrOiz)imf>}f7rbG!`~-e5LwAw zj`sYetZ?r=QENzjzuwMiT@^hYW^5fQE*FfgN%}3<-uJCgy?OtPfC#_g7c7?R4@#Tz zF}04eFlh3d^Fx1=JzjdUX8rqu0mh8CHzW1u?woGu*_3Cu?b(tuK2JS@_N;5ZE#AL| zR8KRSpLeEpU)_nIq|x1$lk}n-Bic`@CvZ|d_=ivNKRufMOP=CaevUsiyXm{cvC<2^ zm2*a2JG<2O@PGEu>v$@+9eQ4FOxAzZq4yWG;R#-a&N&+LHp644XdYfP`-@k25$@Z5 z{=qAp@s~%eU}(7R2_7hj@eoT=MesYAf8q@;fXBceZ}6D5A36T*8{FW@^x{zko@ zy^1-c-*0hSJ$~Q$cou8#*yN?RgnrN7on4YTXQnn|?36o4hM3Il`+)bd$B^+UD<(K( zH7sBKozJgRCN0dEllOhr#rw;D>D|h`UfFzft?|OLHTzfg+(Hc~*}bE1nIo6BgZ^0j z@>BD{$tekRivo9^Fz37R8}(;cly}=BTG!>&((C4-OAC*jKeO)qn@J^a?|Y9ox|gI{ z>}V*uxlPbVzW?2Q?A}v`!J7H}Pm<8Qrk3?#n?BuDOcsrk=WZxEwa#cWZ|}>ar>+qwvW1b+$?TM!8E0};giK~&np^P?p^zTtn-NN=kV$H=E$2a zyK6SwTDW~(z;`Fk_3)2qEc<1^($!s3@k@JE%%S&ECVX5n!=u+Rhph=aw%iW#StJ;L zt@`4TxQFR?h4mNi;&s2BeiHH7>|j#VvlV@Ma6R^&8=>d^#;i)r(RUyQ=BoU8{@97r`~_O}xQdtN(XCE536w1{Z^YzMiW&h1`>3gRMH7d~EWx z2{oz%M%$wke{MLl_Iynh_{oY2*G&F5+pJDssr2+PvL5#E2(=sTXlv2_7G!ub*erZx z2Y}rMz;oe%(fJ$T;YlSiJm9)#+(rO7R*fMclY6+6!5L~ml)G5y5RS$zLBV@nC*wuz1Nx1(WmY#;r6U+UaMiJs%P>(<{G|k8oO-4WVvhK`MrnF9Gq6S z>VX7GkIBD8w`zjsA-ex*No!gls66_bYGJv+P);8-&I!oTp1@5uGF z#4&%tf*pOhw;pi1Kh)pRDx98L5cRe){h94*(}_#)qF*}^AbT*1p5sMN@uEj~(S9mz z*1M4k#Uz@+><0@hEquH#w)9`Naqw%C2=&rwyz2Y#kL5*+{~K(DKNlQ0&ddsG7TX4I z+UEDLvGS}#klWUNhjZW61rN!v3Dq#ydvH4|B=`rA(`)E6`K&z$)ZdFz*0;KjSG>Bt zQZU|P@#CiMeO^?M1f`QsJ~|$uwhCa^C-D}&jvuGrYii&;&lL|$5BuewJ2G)=aQ+bw zo2WRiCF?fyS#@CPh#m9y+QeO`xp{Z=8Kdn3YxptS>qNM>%ck(rORsA(7mYC6J0iEb zPlbu)9jlUo(W$T+c6q*8Y*YUiU17B4GHhSykE&-s4mw&Xz-Vg26D y4K>JFh}T9uFAUtHUj82+``7~j literal 0 HcmV?d00001 diff --git a/toolsrc/.clang-format b/toolsrc/.clang-format deleted file mode 100644 index 374a4233e6..0000000000 --- a/toolsrc/.clang-format +++ /dev/null @@ -1,54 +0,0 @@ -BasedOnStyle: WebKit -Language: Cpp -Standard: Cpp11 - -UseTab: Never -IndentWidth: 4 -ColumnLimit: 120 -PointerAlignment: Left - -BreakBeforeBraces: Allman - -AllowShortBlocksOnASingleLine: false -AllowShortCaseLabelsOnASingleLine: true -AllowShortFunctionsOnASingleLine: All -AllowShortIfStatementsOnASingleLine: true -AllowShortLoopsOnASingleLine: false -AlwaysBreakTemplateDeclarations: true -AlignAfterOpenBracket: true -AlignOperands: true -AlignTrailingComments: true -BinPackArguments: false -BinPackParameters: false -BreakBeforeBinaryOperators: None -BreakConstructorInitializersBeforeComma: true -ConstructorInitializerAllOnOneLineOrOnePerLine: true -Cpp11BracedListStyle: true -IndentCaseLabels: true -KeepEmptyLinesAtTheStartOfBlocks: false -NamespaceIndentation: All -ForEachMacros: [TEST_CASE, SECTION] -PenaltyReturnTypeOnItsOwnLine: 1000 -SpaceAfterTemplateKeyword: false -SpaceBeforeCpp11BracedList: false -DeriveLineEnding: false -UseCRLF: false - -IncludeBlocks: Regroup -IncludeCategories: - - Regex: '^(|"pch\.h")$' - Priority: -1 - - Regex: '^$' - Priority: 1 - - Regex: '^$' - Priority: 2 - - Regex: '^$' - Priority: 3 - - Regex: '^$' - Priority: 4 - - Regex: '^$' - Priority: 5 - - Regex: '^<[a-z0-9_]*\.h>$' - Priority: 6 - - Regex: '^<[a-z0-9_]*>$' # C++ standard library - Priority: 7 diff --git a/toolsrc/CMakeLists.txt b/toolsrc/CMakeLists.txt deleted file mode 100644 index 24ab12818d..0000000000 --- a/toolsrc/CMakeLists.txt +++ /dev/null @@ -1,222 +0,0 @@ -if(WIN32) -# 3.16 for MSVC_RUNTIME_LIBRARY -cmake_minimum_required(VERSION 3.16) -else() -cmake_minimum_required(VERSION 3.14) -endif() - -project(vcpkg C CXX) -include(cmake/utilities.cmake) - -# =============== -# === Options === -# =============== - -include(CMakeDependentOption) - -option(BUILD_TESTING "Option for enabling testing" ON) -option(VCPKG_ALLOW_APPLE_CLANG "Option for allowing apple clang, even versions that we don't know will work" OFF) -option(VCPKG_DEVELOPMENT_WARNINGS "Option for turning on all warnings" ON) -option(VCPKG_WARNINGS_AS_ERRORS "Set warnings to be errors" ${VCPKG_DEVELOPMENT_WARNINGS}) -option(VCPKG_BUILD_FUZZING "Option for enabling vcpkg-fuzz support" OFF) -option(VCPKG_EMBED_GIT_SHA "Option for to fill in the Git SHA version; off by default to avoid privacy concerns out of official builds" OFF) - -CMAKE_DEPENDENT_OPTION(VCPKG_BUILD_BENCHMARKING "Option for enabling benchmarking" OFF - "BUILD_TESTING" OFF) - -if(WERROR) - message(DEPRECATION "-DWERROR is no longer a supported flag. It doesn't do anything.") -endif() -if(DEFINE_DISABLE_METRICS OR VCPKG_DISABLE_METRICS) - message(DEPRECATION "DEFINE_DISABLE_METRICS / VCPKG_DISABLE_METRICS are now handled by creating a " - "file vcpkg.disable_metrics next to the binary.") -endif() - -# ============= -# === Files === -# ============= - -file(GLOB VCPKGLIB_SOURCES CONFIGURE_DEPENDS src/vcpkg/*.cpp) -file(GLOB VCPKGLIB_BASE_SOURCES CONFIGURE_DEPENDS src/vcpkg/base/*.cpp) -file(GLOB VCPKGLIB_INCLUDES CONFIGURE_DEPENDS include/vcpkg/*.h include/vcpkg/fwd/*.h) -file(GLOB VCPKGLIB_BASE_INCLUDES CONFIGURE_DEPENDS include/vcpkg/base/*.h include/vcpkg/base/fwd/*.h) - -set(VCPKG_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/vcpkg.cpp) - -file(GLOB VCPKG_TEST_SOURCES CONFIGURE_DEPENDS src/vcpkg-test/*.cpp) -file(GLOB VCPKG_TEST_INCLUDES CONFIGURE_DEPENDS include/vcpkg-test/*.h) - -file(GLOB VCPKG_FUZZ_SOURCES CONFIGURE_DEPENDS src/vcpkg-fuzz/*.cpp) - -# ======================== -# === System detection === -# ======================== - -vcpkg_detect_compiler() -vcpkg_detect_standard_library() -vcpkg_detect_std_filesystem() - -if (VCPKG_EMBED_GIT_SHA) - find_package(Git REQUIRED) - execute_process( - COMMAND "${GIT_EXECUTABLE}" status --porcelain=v1 - WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} - OUTPUT_VARIABLE VCPKG_GIT_STATUS - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - if (VCPKG_GIT_STATUS STREQUAL "") - execute_process( - COMMAND "${GIT_EXECUTABLE}" rev-parse HEAD - WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} - OUTPUT_VARIABLE VCPKG_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - else() - message(WARNING "Skipping embedding SHA due to local changes.") - endif() -endif() - -if (NOT DEFINED VCPKG_VERSION OR VCPKG_VERSION STREQUAL "") - set(VCPKG_VERSION "unknownhash") -endif() - -set(VCPKG_BASE_VERSION "2021-01-13") - -set(CMAKE_CXX_EXTENSIONS OFF) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_STANDARD 17) -if(MSVC) - string(REGEX REPLACE "[-/]W[0-4]" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") - if (CMAKE_BUILD_TYPE STREQUAL "Release") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zi /guard:cf") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /DEBUG /debugtype:cv,fixup /guard:cf") - endif() -endif() - -if(APPLE) - SET(CMAKE_C_ARCHIVE_CREATE " Scr ") - SET(CMAKE_CXX_ARCHIVE_CREATE " Scr ") - SET(CMAKE_C_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") - SET(CMAKE_CXX_ARCHIVE_FINISH " -no_warning_for_no_symbols -c ") -endif() - -# =============== -# === Targets === -# =============== - -# === Target: vcpkglib === - -add_library(vcpkglib - ${VCPKGLIB_BASE_SOURCES} - ${VCPKGLIB_SOURCES} - ${VCPKGLIB_BASE_INCLUDES} - ${VCPKGLIB_INCLUDES}) -target_include_directories(vcpkglib PUBLIC include) - -vcpkg_target_add_warning_options(vcpkglib) -target_compile_definitions(vcpkglib PUBLIC - VCPKG_USE_STD_FILESYSTEM=$ - VCPKG_VERSION=${VCPKG_VERSION} - VCPKG_BASE_VERSION=${VCPKG_BASE_VERSION} - ) - -set(THREADS_PREFER_PTHREAD_FLAG ON) -find_package(Threads REQUIRED) -target_link_libraries(vcpkglib PRIVATE Threads::Threads) - -if(VCPKG_CXXFS_LIBRARY) - target_link_libraries(vcpkglib PRIVATE ${VCPKG_CXXFS_LIBRARY}) -endif() - -if(MSVC) - get_target_property(_srcs vcpkglib SOURCES) - - if(NOT CMAKE_GENERATOR MATCHES "Visual Studio .*") - set_property(SOURCE src/pch.cpp APPEND PROPERTY OBJECT_OUTPUTS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch") - set_property(SOURCE ${_srcs} APPEND PROPERTY OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/pch.pch") - endif() - - set_source_files_properties(src/pch.cpp PROPERTIES COMPILE_FLAGS "/Ycpch.h") - target_sources(vcpkglib PRIVATE src/pch.cpp) - target_compile_options(vcpkglib PRIVATE /Yupch.h /FIpch.h /Zm200) -else() - target_compile_options(vcpkglib PRIVATE -include "${CMAKE_CURRENT_SOURCE_DIR}/include/pch.h") -endif() - -if (MINGW) - target_compile_definitions(vcpkglib - PUBLIC - UNICODE - _WIN32_WINNT=0x0601 - WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY=4 - __fastfail=exit) - target_link_libraries(vcpkglib PUBLIC winhttp bcrypt version ole32 uuid) -endif() - -# === Target: vcpkg === - -add_executable(vcpkg ${VCPKG_SOURCES}) -target_link_libraries(vcpkg PRIVATE vcpkglib) -vcpkg_target_add_warning_options(vcpkg) - -# === Target: vcpkg-test === - -if (BUILD_TESTING) - enable_testing() - - add_executable(vcpkg-test - ${VCPKG_TEST_SOURCES} - ${VCPKG_TEST_INCLUDES}) - target_link_libraries(vcpkg-test PRIVATE vcpkglib) - vcpkg_target_add_warning_options(vcpkg-test) - - add_test(NAME default COMMAND vcpkg-test --order rand --rng-seed time) - - if (VCPKG_BUILD_BENCHMARKING) - target_compile_options(vcpkg-test PRIVATE -DCATCH_CONFIG_ENABLE_BENCHMARKING) - endif() -endif() - -# === Target: vcpkg-fuzz === - -if(VCPKG_BUILD_FUZZING) - add_executable(vcpkg-fuzz ${VCPKG_FUZZ_SOURCES}) - target_link_libraries(vcpkg-fuzz PRIVATE vcpkglib) - vcpkg_target_add_warning_options(vcpkg-fuzz) -endif() - - -# === Target: tls12-download === - -set(TLS12_DOWNLOAD_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/src/tls12-download.c) -if(WIN32) - add_executable(tls12-download ${TLS12_DOWNLOAD_SOURCES}) - set_property(TARGET tls12-download PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded") - set_property(TARGET tls12-download APPEND PROPERTY LINK_OPTIONS "$,,/ENTRY:entry>") - target_link_libraries(tls12-download winhttp) -endif() - - -# === Target: format === - -find_program(CLANG_FORMAT clang-format) -if(CLANG_FORMAT) - # doing all of these formats in one line has a tendency to overflow the command line length - add_custom_target(format - COMMAND ${CLANG_FORMAT} -i -verbose ${CMAKE_CURRENT_SOURCE_DIR}/src/pch.cpp - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_BASE_SOURCES} - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_SOURCES} - COMMAND ${CLANG_FORMAT} -i -verbose ${CMAKE_CURRENT_SOURCE_DIR}/include/pch.h - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_BASE_INCLUDES} - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKGLIB_INCLUDES} - - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_SOURCES} - - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_TEST_SOURCES} - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_TEST_INCLUDES} - - COMMAND ${CLANG_FORMAT} -i -verbose ${VCPKG_FUZZ_SOURCES} - COMMAND ${CLANG_FORMAT} -i -verbose ${TLS12_DOWNLOAD_SOURCES} - ) -endif() diff --git a/toolsrc/cmake/utilities.cmake b/toolsrc/cmake/utilities.cmake deleted file mode 100644 index 4b434a9c76..0000000000 --- a/toolsrc/cmake/utilities.cmake +++ /dev/null @@ -1,250 +0,0 @@ -# Outputs to Cache: VCPKG_COMPILER -function(vcpkg_detect_compiler) - if(NOT DEFINED CACHE{VCPKG_COMPILER}) - message(STATUS "Detecting the C++ compiler in use") - if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) - message(FATAL_ERROR [[ -The g++ version picked up is too old; please install a newer compiler such as g++-7. -On Ubuntu try the following: - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y - sudo apt-get update -y - sudo apt-get install g++-7 -y -On CentOS try the following: - sudo yum install centos-release-scl - sudo yum install devtoolset-7 - scl enable devtoolset-7 bash -]]) - endif() - - set(COMPILER "gcc") - elseif(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") - #[[ - Note: CMAKE_SYSTEM_VERSION uses darwin versions - - Darwin 19.0.0 = macOS 10.15, iOS 13 - - Darwin 18.0.0 = macOS 10.14, iOS 12 - - Darwin 17.0.0 = macOS 10.13, iOS 11 - - Darwin 16.0.0 = macOS 10.12, iOS 10 - ]] - if(CMAKE_SYSTEM_VERSION VERSION_LESS "19.0.0" AND NOT VCPKG_ALLOW_APPLE_CLANG) - message(FATAL_ERROR [[ -Building the vcpkg tool requires support for the C++ Filesystem TS. -macOS versions below 10.15 do not have support for it with Apple Clang. -Please install gcc6 or newer from homebrew (brew install gcc). -If you would like to try anyway, pass --allowAppleClang to bootstrap.sh. -]]) - endif() - set(COMPILER "clang") - elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang") - set(COMPILER "clang") - elseif(MSVC) - set(COMPILER "msvc") - else() - message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}") - endif() - - set(VCPKG_COMPILER ${COMPILER} - CACHE STRING - "The compiler in use; one of gcc, clang, msvc") - message(STATUS "Detecting the C++ compiler in use - ${VCPKG_COMPILER}") - endif() -endfunction() - -# Outputs to Cache: VCPKG_STANDARD_LIBRARY -function(vcpkg_detect_standard_library) - if(NOT DEFINED CACHE{VCPKG_STANDARD_LIBRARY}) - include(CheckCXXSourceCompiles) - - message(STATUS "Detecting the C++ standard library") - - # note: since is the smallest header, generally it's used to get the standard library version - set(CMAKE_REQUIRED_QUIET ON) - check_cxx_source_compiles([[ -#include -#if !defined(__GLIBCXX__) -#error "not libstdc++" -#endif -int main() {} -]] - _VCPKG_STANDARD_LIBRARY_LIBSTDCXX) - check_cxx_source_compiles([[ -#include -#if !defined(_LIBCPP_VERSION) -#error "not libc++" -#endif -int main() {} -]] - _VCPKG_STANDARD_LIBRARY_LIBCXX) - check_cxx_source_compiles([[ -#include -#if !defined(_MSVC_STL_VERSION) && !(defined(_MSC_VER) && _MSC_VER <= 1900) -#error "not MSVC stl" -#endif -int main() {} -]] - _VCPKG_STANDARD_LIBRARY_MSVC_STL) - if(_VCPKG_STANDARD_LIBRARY_LIBSTDCXX) - set(STANDARD_LIBRARY "libstdc++") - elseif(_VCPKG_STANDARD_LIBRARY_LIBCXX) - set(STANDARD_LIBRARY "libc++") - elseif(_VCPKG_STANDARD_LIBRARY_MSVC_STL) - set(STANDARD_LIBRARY "msvc-stl") - else() - message(FATAL_ERROR "Can't find which C++ runtime is in use") - endif() - - set(VCPKG_STANDARD_LIBRARY ${STANDARD_LIBRARY} - CACHE STRING - "The C++ standard library in use; one of libstdc++, libc++, msvc-stl") - - message(STATUS "Detecting the C++ standard library - ${VCPKG_STANDARD_LIBRARY}") - endif() -endfunction() - -# Outputs to Cache: VCPKG_USE_STD_FILESYSTEM, VCPKG_CXXFS_LIBRARY -function(vcpkg_detect_std_filesystem) - vcpkg_detect_standard_library() - - if(NOT DEFINED CACHE{VCPKG_USE_STD_FILESYSTEM}) - include(CheckCXXSourceCompiles) - - message(STATUS "Detecting how to use the C++ filesystem library") - - set(CMAKE_REQUIRED_QUIET ON) - if(VCPKG_STANDARD_LIBRARY STREQUAL "libstdc++") - check_cxx_source_compiles([[ -#include -#if defined(_GLIBCXX_RELEASE) && _GLIBCXX_RELEASE >= 9 -#error "libstdc++ after version 9 does not require -lstdc++fs" -#endif -int main() {} -]] - _VCPKG_REQUIRE_LINK_CXXFS) - - check_cxx_source_compiles([[ -#include -#if !defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE < 8 -#error "libstdc++ before version 8 does not support " -#endif -int main() {} -]] - _VCPKG_USE_STD_FILESYSTEM) - - if(_VCPKG_REQUIRE_LINK_CXXFS) - set(_VCPKG_CXXFS_LIBRARY "stdc++fs") - endif() - elseif(VCPKG_STANDARD_LIBRARY STREQUAL "libc++") - if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") - # AppleClang never requires (or allows) -lc++fs, even with libc++ version 8.0.0 - set(_VCPKG_CXXFS_LIBRARY OFF) - elseif(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") - # As above, not required on this platform (tested at least on 6.8) - set(_VCPKG_CXXFS_LIBRARY OFF) - else() - check_cxx_source_compiles([[ -#include -#if _LIBCPP_VERSION >= 9000 -#error "libc++ after version 9 does not require -lc++fs" -#endif -int main() {} -]] - _VCPKG_REQUIRE_LINK_CXXFS) - - if(_VCPKG_REQUIRE_LINK_CXXFS) - set(_VCPKG_CXXFS_LIBRARY "c++fs") - endif() - endif() - - # We don't support versions of libc++ < 7.0.0, and libc++ 7.0.0 has - set(_VCPKG_USE_STD_FILESYSTEM ON) - elseif(VCPKG_STANDARD_LIBRARY STREQUAL "msvc-stl") - check_cxx_source_compiles( - "#include - #if !defined(_MSVC_STL_UPDATE) || _MSVC_STL_UPDATE < 201803 - #error \"MSVC STL before 15.7 does not support \" - #endif - int main() {}" - _VCPKG_USE_STD_FILESYSTEM) - - set(_VCPKG_CXXFS_LIBRARY OFF) - endif() - - set(VCPKG_USE_STD_FILESYSTEM ${_VCPKG_USE_STD_FILESYSTEM} - CACHE BOOL - "Whether to use , as opposed to " - FORCE) - set(VCPKG_CXXFS_LIBRARY ${_VCPKG_CXXFS_LIBRARY} - CACHE STRING - "Library to link (if any) in order to use " - FORCE) - - if(VCPKG_USE_STD_FILESYSTEM) - set(msg "") - else() - set(msg "") - endif() - if(VCPKG_CXXFS_LIBRARY) - set(msg "${msg} with -l${VCPKG_CXXFS_LIBRARY}") - endif() - - message(STATUS "Detecting how to use the C++ filesystem library - ${msg}") - endif() -endfunction() - -function(vcpkg_target_add_warning_options TARGET) - if(MSVC) - # either MSVC, or clang-cl - target_compile_options(${TARGET} PRIVATE -FC) - - if (MSVC_VERSION GREATER 1900) - # Visual Studio 2017 or later - target_compile_options(${TARGET} PRIVATE -permissive- -utf-8) - endif() - - if(VCPKG_DEVELOPMENT_WARNINGS) - target_compile_options(${TARGET} PRIVATE -W4) - if(VCPKG_COMPILER STREQUAL "clang") - # -Wno-range-loop-analysis is due to an LLVM bug which will be fixed in a - # future version of clang https://reviews.llvm.org/D73007 - target_compile_options(${TARGET} PRIVATE - -Wmissing-prototypes - -Wno-missing-field-initializers - -Wno-range-loop-analysis - ) - else() - target_compile_options(${TARGET} PRIVATE -analyze) - endif() - else() - target_compile_options(${TARGET} PRIVATE -W3) - endif() - - if(VCPKG_WARNINGS_AS_ERRORS) - target_compile_options(${TARGET} PRIVATE -WX) - endif() - else() - if(VCPKG_DEVELOPMENT_WARNINGS) - target_compile_options(${TARGET} PRIVATE - -Wall -Wextra -Wpedantic - -Wno-unknown-pragmas - -Wno-missing-field-initializers - -Wno-redundant-move - ) - - # GCC and clang have different names for the same warning - if(VCPKG_COMPILER STREQUAL "gcc") - target_compile_options(${TARGET} PRIVATE - -Wmissing-declarations - ) - elseif(VCPKG_COMPILER STREQUAL "clang") - target_compile_options(${TARGET} PRIVATE - -Wmissing-prototypes - -Wno-range-loop-analysis - ) - endif() - endif() - - if(VCPKG_WARNINGS_AS_ERRORS) - target_compile_options(${TARGET} PRIVATE -Werror) - endif() - endif() -endfunction() diff --git a/toolsrc/include/catch2/catch.hpp b/toolsrc/include/catch2/catch.hpp deleted file mode 100644 index f471a2ec68..0000000000 --- a/toolsrc/include/catch2/catch.hpp +++ /dev/null @@ -1,16865 +0,0 @@ -/* - * Catch v2.9.1 - * Generated: 2019-06-17 11:59:24.363643 - * ---------------------------------------------------------- - * This file has been merged from multiple headers. Please don't edit it directly - * Copyright (c) 2019 Two Blue Cubes Ltd. All rights reserved. - * - * Distributed under the Boost Software License, Version 1.0. (See accompanying - * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - */ -#ifndef TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -#define TWOBLUECUBES_SINGLE_INCLUDE_CATCH_HPP_INCLUDED -// start catch.hpp - - -#define CATCH_VERSION_MAJOR 2 -#define CATCH_VERSION_MINOR 9 -#define CATCH_VERSION_PATCH 1 - -#ifdef __clang__ -# pragma clang system_header -#elif defined __GNUC__ -# pragma GCC system_header -#endif - -// start catch_suppress_warnings.h - -#ifdef __clang__ -# ifdef __ICC // icpc defines the __clang__ macro -# pragma warning(push) -# pragma warning(disable: 161 1682) -# else // __ICC -# pragma clang diagnostic push -# pragma clang diagnostic ignored "-Wpadded" -# pragma clang diagnostic ignored "-Wswitch-enum" -# pragma clang diagnostic ignored "-Wcovered-switch-default" -# endif -#elif defined __GNUC__ - // Because REQUIREs trigger GCC's -Wparentheses, and because still - // supported version of g++ have only buggy support for _Pragmas, - // Wparentheses have to be suppressed globally. -# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details - -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wunused-variable" -# pragma GCC diagnostic ignored "-Wpadded" -#endif -// end catch_suppress_warnings.h -#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER) -# define CATCH_IMPL -# define CATCH_CONFIG_ALL_PARTS -#endif - -// In the impl file, we want to have access to all parts of the headers -// Can also be used to sanely support PCHs -#if defined(CATCH_CONFIG_ALL_PARTS) -# define CATCH_CONFIG_EXTERNAL_INTERFACES -# if defined(CATCH_CONFIG_DISABLE_MATCHERS) -# undef CATCH_CONFIG_DISABLE_MATCHERS -# endif -# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER) -# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER -# endif -#endif - -#if !defined(CATCH_CONFIG_IMPL_ONLY) -// start catch_platform.h - -#ifdef __APPLE__ -# include -# if TARGET_OS_OSX == 1 -# define CATCH_PLATFORM_MAC -# elif TARGET_OS_IPHONE == 1 -# define CATCH_PLATFORM_IPHONE -# endif - -#elif defined(linux) || defined(__linux) || defined(__linux__) -# define CATCH_PLATFORM_LINUX - -#elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) || defined(__MINGW32__) -# define CATCH_PLATFORM_WINDOWS -#endif - -// end catch_platform.h - -#ifdef CATCH_IMPL -# ifndef CLARA_CONFIG_MAIN -# define CLARA_CONFIG_MAIN_NOT_DEFINED -# define CLARA_CONFIG_MAIN -# endif -#endif - -// start catch_user_interfaces.h - -namespace Catch { - unsigned int rngSeed(); -} - -// end catch_user_interfaces.h -// start catch_tag_alias_autoregistrar.h - -// start catch_common.h - -// start catch_compiler_capabilities.h - -// Detect a number of compiler features - by compiler -// The following features are defined: -// -// CATCH_CONFIG_COUNTER : is the __COUNTER__ macro supported? -// CATCH_CONFIG_WINDOWS_SEH : is Windows SEH supported? -// CATCH_CONFIG_POSIX_SIGNALS : are POSIX signals supported? -// CATCH_CONFIG_DISABLE_EXCEPTIONS : Are exceptions enabled? -// **************** -// Note to maintainers: if new toggles are added please document them -// in configuration.md, too -// **************** - -// In general each macro has a _NO_ form -// (e.g. CATCH_CONFIG_NO_POSIX_SIGNALS) which disables the feature. -// Many features, at point of detection, define an _INTERNAL_ macro, so they -// can be combined, en-mass, with the _NO_ forms later. - -#ifdef __cplusplus - -# if (__cplusplus >= 201402L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201402L) -# define CATCH_CPP14_OR_GREATER -# endif - -# if (__cplusplus >= 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) -# define CATCH_CPP17_OR_GREATER -# endif - -#endif - -#if defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - -#ifdef __clang__ - -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wexit-time-destructors\"" ) \ - _Pragma( "clang diagnostic ignored \"-Wglobal-constructors\"") -# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wparentheses\"" ) -# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wunused-variable\"" ) -# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS \ - _Pragma( "clang diagnostic push" ) \ - _Pragma( "clang diagnostic ignored \"-Wgnu-zero-variadic-macro-arguments\"" ) -# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS \ - _Pragma( "clang diagnostic pop" ) - -#endif // __clang__ - -//////////////////////////////////////////////////////////////////////////////// -// Assume that non-Windows platforms support posix signals by default -#if !defined(CATCH_PLATFORM_WINDOWS) - #define CATCH_INTERNAL_CONFIG_POSIX_SIGNALS -#endif - -//////////////////////////////////////////////////////////////////////////////// -// We know some environments not to support full POSIX signals -#if defined(__CYGWIN__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(__DJGPP__) - #define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -#endif - -#ifdef __OS400__ -# define CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS -# define CATCH_CONFIG_COLOUR_NONE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Android somehow still does not support std::to_string -#if defined(__ANDROID__) -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Not all Windows environments support SEH properly -#if defined(__MINGW32__) -# define CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH -#endif - -//////////////////////////////////////////////////////////////////////////////// -// PS4 -#if defined(__ORBIS__) -# define CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Cygwin -#ifdef __CYGWIN__ - -// Required for some versions of Cygwin to declare gettimeofday -// see: http://stackoverflow.com/questions/36901803/gettimeofday-not-declared-in-this-scope-cygwin -# define _BSD_SOURCE -// some versions of cygwin (most) do not support std::to_string. Use the libstd check. -// https://gcc.gnu.org/onlinedocs/gcc-4.8.2/libstdc++/api/a01053_source.html line 2812-2813 -# if !((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ - && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) - -# define CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING - -# endif -#endif // __CYGWIN__ - -//////////////////////////////////////////////////////////////////////////////// -// Visual C++ -#ifdef _MSC_VER - -# if _MSC_VER >= 1900 // Visual Studio 2015 or newer -# define CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -# endif - -// Universal Windows platform does not support SEH -// Or console colours (or console at all...) -# if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP) -# define CATCH_CONFIG_COLOUR_NONE -# else -# define CATCH_INTERNAL_CONFIG_WINDOWS_SEH -# endif - -// MSVC traditional preprocessor needs some workaround for __VA_ARGS__ -// _MSVC_TRADITIONAL == 0 means new conformant preprocessor -// _MSVC_TRADITIONAL == 1 means old traditional non-conformant preprocessor -# if !defined(_MSVC_TRADITIONAL) || (defined(_MSVC_TRADITIONAL) && _MSVC_TRADITIONAL) -# define CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -# endif -#endif // _MSC_VER - -#if defined(_REENTRANT) || defined(_MSC_VER) -// Enable async processing, as -pthread is specified or no additional linking is required -# define CATCH_INTERNAL_CONFIG_USE_ASYNC -#endif // _MSC_VER - -//////////////////////////////////////////////////////////////////////////////// -// Check if we are compiled with -fno-exceptions or equivalent -#if defined(__EXCEPTIONS) || defined(__cpp_exceptions) || defined(_CPPUNWIND) -# define CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED -#endif - -//////////////////////////////////////////////////////////////////////////////// -// DJGPP -#ifdef __DJGPP__ -# define CATCH_INTERNAL_CONFIG_NO_WCHAR -#endif // __DJGPP__ - -//////////////////////////////////////////////////////////////////////////////// -// Embarcadero C++Build -#if defined(__BORLANDC__) - #define CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN -#endif - -//////////////////////////////////////////////////////////////////////////////// - -// Use of __COUNTER__ is suppressed during code analysis in -// CLion/AppCode 2017.2.x and former, because __COUNTER__ is not properly -// handled by it. -// Otherwise all supported compilers support COUNTER macro, -// but user still might want to turn it off -#if ( !defined(__JETBRAINS_IDE__) || __JETBRAINS_IDE__ >= 20170300L ) - #define CATCH_INTERNAL_CONFIG_COUNTER -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Check if string_view is available and usable -// The check is split apart to work around v140 (VS2015) preprocessor issue... -#if defined(__has_include) -#if __has_include() && defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW -#endif -#endif - -//////////////////////////////////////////////////////////////////////////////// -// Check if optional is available and usable -#if defined(__has_include) -# if __has_include() && defined(CATCH_CPP17_OR_GREATER) -# define CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL -# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) -#endif // __has_include - -//////////////////////////////////////////////////////////////////////////////// -// Check if variant is available and usable -#if defined(__has_include) -# if __has_include() && defined(CATCH_CPP17_OR_GREATER) -# if defined(__clang__) && (__clang_major__ < 8) - // work around clang bug with libstdc++ https://bugs.llvm.org/show_bug.cgi?id=31852 - // fix should be in clang 8, workaround in libstdc++ 8.2 -# include -# if defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) -# define CATCH_CONFIG_NO_CPP17_VARIANT -# else -# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT -# endif // defined(__GLIBCXX__) && defined(_GLIBCXX_RELEASE) && (_GLIBCXX_RELEASE < 9) -# else -# define CATCH_INTERNAL_CONFIG_CPP17_VARIANT -# endif // defined(__clang__) && (__clang_major__ < 8) -# endif // __has_include() && defined(CATCH_CPP17_OR_GREATER) -#endif // __has_include - -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) -# define CATCH_CONFIG_COUNTER -#endif -#if defined(CATCH_INTERNAL_CONFIG_WINDOWS_SEH) && !defined(CATCH_CONFIG_NO_WINDOWS_SEH) && !defined(CATCH_CONFIG_WINDOWS_SEH) && !defined(CATCH_INTERNAL_CONFIG_NO_WINDOWS_SEH) -# define CATCH_CONFIG_WINDOWS_SEH -#endif -// This is set by default, because we assume that unix compilers are posix-signal-compatible by default. -#if defined(CATCH_INTERNAL_CONFIG_POSIX_SIGNALS) && !defined(CATCH_INTERNAL_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_NO_POSIX_SIGNALS) && !defined(CATCH_CONFIG_POSIX_SIGNALS) -# define CATCH_CONFIG_POSIX_SIGNALS -#endif -// This is set by default, because we assume that compilers with no wchar_t support are just rare exceptions. -#if !defined(CATCH_INTERNAL_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_NO_WCHAR) && !defined(CATCH_CONFIG_WCHAR) -# define CATCH_CONFIG_WCHAR -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_NO_CPP11_TO_STRING) && !defined(CATCH_CONFIG_CPP11_TO_STRING) -# define CATCH_CONFIG_CPP11_TO_STRING -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_NO_CPP17_OPTIONAL) && !defined(CATCH_CONFIG_CPP17_OPTIONAL) -# define CATCH_CONFIG_CPP17_OPTIONAL -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS) && !defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS) -# define CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_NO_CPP17_STRING_VIEW) && !defined(CATCH_CONFIG_CPP17_STRING_VIEW) -# define CATCH_CONFIG_CPP17_STRING_VIEW -#endif - -#if defined(CATCH_INTERNAL_CONFIG_CPP17_VARIANT) && !defined(CATCH_CONFIG_NO_CPP17_VARIANT) && !defined(CATCH_CONFIG_CPP17_VARIANT) -# define CATCH_CONFIG_CPP17_VARIANT -#endif - -#if defined(CATCH_CONFIG_EXPERIMENTAL_REDIRECT) -# define CATCH_INTERNAL_CONFIG_NEW_CAPTURE -#endif - -#if defined(CATCH_INTERNAL_CONFIG_NEW_CAPTURE) && !defined(CATCH_INTERNAL_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NO_NEW_CAPTURE) && !defined(CATCH_CONFIG_NEW_CAPTURE) -# define CATCH_CONFIG_NEW_CAPTURE -#endif - -#if !defined(CATCH_INTERNAL_CONFIG_EXCEPTIONS_ENABLED) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -# define CATCH_CONFIG_DISABLE_EXCEPTIONS -#endif - -#if defined(CATCH_INTERNAL_CONFIG_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_NO_POLYFILL_ISNAN) && !defined(CATCH_CONFIG_POLYFILL_ISNAN) -# define CATCH_CONFIG_POLYFILL_ISNAN -#endif - -#if defined(CATCH_INTERNAL_CONFIG_USE_ASYNC) && !defined(CATCH_CONFIG_NO_USE_ASYNC) && !defined(CATCH_CONFIG_USE_ASYNC) -# define CATCH_CONFIG_USE_ASYNC -#endif - -#if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_PARENTHESES_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_UNUSED_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_UNUSED_WARNINGS -#endif -#if !defined(CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS) -# define CATCH_INTERNAL_SUPPRESS_ZERO_VARIADIC_WARNINGS -# define CATCH_INTERNAL_UNSUPPRESS_ZERO_VARIADIC_WARNINGS -#endif - -#if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) -#define CATCH_TRY if ((true)) -#define CATCH_CATCH_ALL if ((false)) -#define CATCH_CATCH_ANON(type) if ((false)) -#else -#define CATCH_TRY try -#define CATCH_CATCH_ALL catch (...) -#define CATCH_CATCH_ANON(type) catch (type) -#endif - -#if defined(CATCH_INTERNAL_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_NO_TRADITIONAL_MSVC_PREPROCESSOR) && !defined(CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR) -#define CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#endif - -// end catch_compiler_capabilities.h -#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line -#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) -#ifdef CATCH_CONFIG_COUNTER -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) -#else -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) -#endif - -#include -#include -#include - -// We need a dummy global operator<< so we can bring it into Catch namespace later -struct Catch_global_namespace_dummy {}; -std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy); - -namespace Catch { - - struct CaseSensitive { enum Choice { - Yes, - No - }; }; - - class NonCopyable { - NonCopyable( NonCopyable const& ) = delete; - NonCopyable( NonCopyable && ) = delete; - NonCopyable& operator = ( NonCopyable const& ) = delete; - NonCopyable& operator = ( NonCopyable && ) = delete; - - protected: - NonCopyable(); - virtual ~NonCopyable(); - }; - - struct SourceLineInfo { - - SourceLineInfo() = delete; - SourceLineInfo( char const* _file, std::size_t _line ) noexcept - : file( _file ), - line( _line ) - {} - - SourceLineInfo( SourceLineInfo const& other ) = default; - SourceLineInfo& operator = ( SourceLineInfo const& ) = default; - SourceLineInfo( SourceLineInfo&& ) noexcept = default; - SourceLineInfo& operator = ( SourceLineInfo&& ) noexcept = default; - - bool empty() const noexcept; - bool operator == ( SourceLineInfo const& other ) const noexcept; - bool operator < ( SourceLineInfo const& other ) const noexcept; - - char const* file; - std::size_t line; - }; - - std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ); - - // Bring in operator<< from global namespace into Catch namespace - // This is necessary because the overload of operator<< above makes - // lookup stop at namespace Catch - using ::operator<<; - - // Use this in variadic streaming macros to allow - // >> +StreamEndStop - // as well as - // >> stuff +StreamEndStop - struct StreamEndStop { - std::string operator+() const; - }; - template - T const& operator + ( T const& value, StreamEndStop ) { - return value; - } -} - -#define CATCH_INTERNAL_LINEINFO \ - ::Catch::SourceLineInfo( __FILE__, static_cast( __LINE__ ) ) - -// end catch_common.h -namespace Catch { - - struct RegistrarForTagAliases { - RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); - }; - -} // end namespace Catch - -#define CATCH_REGISTER_TAG_ALIAS( alias, spec ) \ - CATCH_INTERNAL_SUPPRESS_GLOBALS_WARNINGS \ - namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } \ - CATCH_INTERNAL_UNSUPPRESS_GLOBALS_WARNINGS - -// end catch_tag_alias_autoregistrar.h -// start catch_test_registry.h - -// start catch_interfaces_testcase.h - -#include - -namespace Catch { - - class TestSpec; - - struct ITestInvoker { - virtual void invoke () const = 0; - virtual ~ITestInvoker(); - }; - - class TestCase; - struct IConfig; - - struct ITestCaseRegistry { - virtual ~ITestCaseRegistry(); - virtual std::vector const& getAllTests() const = 0; - virtual std::vector const& getAllTestsSorted( IConfig const& config ) const = 0; - }; - - bool matchTest( TestCase const& testCase, TestSpec const& testSpec, IConfig const& config ); - std::vector filterTests( std::vector const& testCases, TestSpec const& testSpec, IConfig const& config ); - std::vector const& getAllTestCasesSorted( IConfig const& config ); - -} - -// end catch_interfaces_testcase.h -// start catch_stringref.h - -#include -#include -#include - -namespace Catch { - - /// A non-owning string class (similar to the forthcoming std::string_view) - /// Note that, because a StringRef may be a substring of another string, - /// it may not be null terminated. c_str() must return a null terminated - /// string, however, and so the StringRef will internally take ownership - /// (taking a copy), if necessary. In theory this ownership is not externally - /// visible - but it does mean (substring) StringRefs should not be shared between - /// threads. - class StringRef { - public: - using size_type = std::size_t; - - private: - friend struct StringRefTestAccess; - - char const* m_start; - size_type m_size; - - char* m_data = nullptr; - - void takeOwnership(); - - static constexpr char const* const s_empty = ""; - - public: // construction/ assignment - StringRef() noexcept - : StringRef( s_empty, 0 ) - {} - - StringRef( StringRef const& other ) noexcept - : m_start( other.m_start ), - m_size( other.m_size ) - {} - - StringRef( StringRef&& other ) noexcept - : m_start( other.m_start ), - m_size( other.m_size ), - m_data( other.m_data ) - { - other.m_data = nullptr; - } - - StringRef( char const* rawChars ) noexcept; - - StringRef( char const* rawChars, size_type size ) noexcept - : m_start( rawChars ), - m_size( size ) - {} - - StringRef( std::string const& stdString ) noexcept - : m_start( stdString.c_str() ), - m_size( stdString.size() ) - {} - - ~StringRef() noexcept { - delete[] m_data; - } - - auto operator = ( StringRef const &other ) noexcept -> StringRef& { - delete[] m_data; - m_data = nullptr; - m_start = other.m_start; - m_size = other.m_size; - return *this; - } - - operator std::string() const; - - void swap( StringRef& other ) noexcept; - - public: // operators - auto operator == ( StringRef const& other ) const noexcept -> bool; - auto operator != ( StringRef const& other ) const noexcept -> bool; - - auto operator[] ( size_type index ) const noexcept -> char; - - public: // named queries - auto empty() const noexcept -> bool { - return m_size == 0; - } - auto size() const noexcept -> size_type { - return m_size; - } - - auto numberOfCharacters() const noexcept -> size_type; - auto c_str() const -> char const*; - - public: // substrings and searches - auto substr( size_type start, size_type size ) const noexcept -> StringRef; - - // Returns the current start pointer. - // Note that the pointer can change when if the StringRef is a substring - auto currentData() const noexcept -> char const*; - - private: // ownership queries - may not be consistent between calls - auto isOwned() const noexcept -> bool; - auto isSubstring() const noexcept -> bool; - }; - - auto operator + ( StringRef const& lhs, StringRef const& rhs ) -> std::string; - auto operator + ( StringRef const& lhs, char const* rhs ) -> std::string; - auto operator + ( char const* lhs, StringRef const& rhs ) -> std::string; - - auto operator += ( std::string& lhs, StringRef const& sr ) -> std::string&; - auto operator << ( std::ostream& os, StringRef const& sr ) -> std::ostream&; - - inline auto operator "" _sr( char const* rawChars, std::size_t size ) noexcept -> StringRef { - return StringRef( rawChars, size ); - } - -} // namespace Catch - -inline auto operator "" _catch_sr( char const* rawChars, std::size_t size ) noexcept -> Catch::StringRef { - return Catch::StringRef( rawChars, size ); -} - -// end catch_stringref.h -// start catch_type_traits.hpp - - -#include - -namespace Catch{ - -#ifdef CATCH_CPP17_OR_GREATER - template - inline constexpr auto is_unique = std::true_type{}; - - template - inline constexpr auto is_unique = std::bool_constant< - (!std::is_same_v && ...) && is_unique - >{}; -#else - -template -struct is_unique : std::true_type{}; - -template -struct is_unique : std::integral_constant -::value - && is_unique::value - && is_unique::value ->{}; - -#endif -} - -// end catch_type_traits.hpp -// start catch_preprocessor.hpp - - -#define CATCH_RECURSION_LEVEL0(...) __VA_ARGS__ -#define CATCH_RECURSION_LEVEL1(...) CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(CATCH_RECURSION_LEVEL0(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL2(...) CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(CATCH_RECURSION_LEVEL1(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL3(...) CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(CATCH_RECURSION_LEVEL2(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL4(...) CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(CATCH_RECURSION_LEVEL3(__VA_ARGS__))) -#define CATCH_RECURSION_LEVEL5(...) CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(CATCH_RECURSION_LEVEL4(__VA_ARGS__))) - -#ifdef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_EXPAND_VARGS(...) __VA_ARGS__ -// MSVC needs more evaluations -#define CATCH_RECURSION_LEVEL6(...) CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(CATCH_RECURSION_LEVEL5(__VA_ARGS__))) -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL6(CATCH_RECURSION_LEVEL6(__VA_ARGS__)) -#else -#define CATCH_RECURSE(...) CATCH_RECURSION_LEVEL5(__VA_ARGS__) -#endif - -#define CATCH_REC_END(...) -#define CATCH_REC_OUT - -#define CATCH_EMPTY() -#define CATCH_DEFER(id) id CATCH_EMPTY() - -#define CATCH_REC_GET_END2() 0, CATCH_REC_END -#define CATCH_REC_GET_END1(...) CATCH_REC_GET_END2 -#define CATCH_REC_GET_END(...) CATCH_REC_GET_END1 -#define CATCH_REC_NEXT0(test, next, ...) next CATCH_REC_OUT -#define CATCH_REC_NEXT1(test, next) CATCH_DEFER ( CATCH_REC_NEXT0 ) ( test, next, 0) -#define CATCH_REC_NEXT(test, next) CATCH_REC_NEXT1(CATCH_REC_GET_END test, next) - -#define CATCH_REC_LIST0(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1(f, x, peek, ...) , f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0) ) ( f, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2(f, x, peek, ...) f(x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1) ) ( f, peek, __VA_ARGS__ ) - -#define CATCH_REC_LIST0_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST1_UD(f, userdata, x, peek, ...) , f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST0_UD) ) ( f, userdata, peek, __VA_ARGS__ ) -#define CATCH_REC_LIST2_UD(f, userdata, x, peek, ...) f(userdata, x) CATCH_DEFER ( CATCH_REC_NEXT(peek, CATCH_REC_LIST1_UD) ) ( f, userdata, peek, __VA_ARGS__ ) - -// Applies the function macro `f` to each of the remaining parameters, inserts commas between the results, -// and passes userdata as the first parameter to each invocation, -// e.g. CATCH_REC_LIST_UD(f, x, a, b, c) evaluates to f(x, a), f(x, b), f(x, c) -#define CATCH_REC_LIST_UD(f, userdata, ...) CATCH_RECURSE(CATCH_REC_LIST2_UD(f, userdata, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define CATCH_REC_LIST(f, ...) CATCH_RECURSE(CATCH_REC_LIST2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0)) - -#define INTERNAL_CATCH_EXPAND1(param) INTERNAL_CATCH_EXPAND2(param) -#define INTERNAL_CATCH_EXPAND2(...) INTERNAL_CATCH_NO## __VA_ARGS__ -#define INTERNAL_CATCH_DEF(...) INTERNAL_CATCH_DEF __VA_ARGS__ -#define INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE(...) INTERNAL_CATCH_STRINGIZE2(__VA_ARGS__) -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_STRINGIZE2(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) -#else -// MSVC is adding extra space and needs another indirection to expand INTERNAL_CATCH_NOINTERNAL_CATCH_DEF -#define INTERNAL_CATCH_STRINGIZE2(...) INTERNAL_CATCH_STRINGIZE3(__VA_ARGS__) -#define INTERNAL_CATCH_STRINGIZE3(...) #__VA_ARGS__ -#define INTERNAL_CATCH_STRINGIZE_WITHOUT_PARENS(param) (INTERNAL_CATCH_STRINGIZE(INTERNAL_CATCH_REMOVE_PARENS(param)) + 1) -#endif - -#define INTERNAL_CATCH_MAKE_NAMESPACE2(...) ns_##__VA_ARGS__ -#define INTERNAL_CATCH_MAKE_NAMESPACE(name) INTERNAL_CATCH_MAKE_NAMESPACE2(name) - -#define INTERNAL_CATCH_REMOVE_PARENS(...) INTERNAL_CATCH_EXPAND1(INTERNAL_CATCH_DEF __VA_ARGS__) - -#ifndef CATCH_CONFIG_TRADITIONAL_MSVC_PREPROCESSOR -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) decltype(get_wrapper()) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__)) -#else -#define INTERNAL_CATCH_MAKE_TYPE_LIST2(...) INTERNAL_CATCH_EXPAND_VARGS(decltype(get_wrapper())) -#define INTERNAL_CATCH_MAKE_TYPE_LIST(...) INTERNAL_CATCH_EXPAND_VARGS(INTERNAL_CATCH_MAKE_TYPE_LIST2(INTERNAL_CATCH_REMOVE_PARENS(__VA_ARGS__))) -#endif - -#define INTERNAL_CATCH_MAKE_TYPE_LISTS_FROM_TYPES(...)\ - CATCH_REC_LIST(INTERNAL_CATCH_MAKE_TYPE_LIST,__VA_ARGS__) - -#define INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_0) INTERNAL_CATCH_REMOVE_PARENS(_0) -#define INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_0, _1) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_1_ARG(_1) -#define INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_0, _1, _2) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_2_ARG(_1, _2) -#define INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_0, _1, _2, _3) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_3_ARG(_1, _2, _3) -#define INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_0, _1, _2, _3, _4) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_4_ARG(_1, _2, _3, _4) -#define INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_0, _1, _2, _3, _4, _5) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_5_ARG(_1, _2, _3, _4, _5) -#define INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_0, _1, _2, _3, _4, _5, _6) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_6_ARG(_1, _2, _4, _5, _6) -#define INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_0, _1, _2, _3, _4, _5, _6, _7) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_7_ARG(_1, _2, _3, _4, _5, _6, _7) -#define INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_8_ARG(_1, _2, _3, _4, _5, _6, _7, _8) -#define INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_9_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9) -#define INTERNAL_CATCH_REMOVE_PARENS_11_ARG(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10) INTERNAL_CATCH_REMOVE_PARENS(_0), INTERNAL_CATCH_REMOVE_PARENS_10_ARG(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10) - -#define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, N, ...) N - -#define INTERNAL_CATCH_TYPE_GEN\ - template struct TypeList {};\ - template\ - constexpr auto get_wrapper() noexcept -> TypeList { return {}; }\ - \ - template class L1, typename...E1, template class L2, typename...E2> \ - constexpr auto append(L1, L2) noexcept -> L1 { return {}; }\ - template< template class L1, typename...E1, template class L2, typename...E2, typename...Rest>\ - constexpr auto append(L1, L2, Rest...) noexcept -> decltype(append(L1{}, Rest{}...)) { return {}; }\ - template< template class L1, typename...E1, typename...Rest>\ - constexpr auto append(L1, TypeList, Rest...) noexcept -> L1 { return {}; }\ - \ - template< template class Container, template class List, typename...elems>\ - constexpr auto rewrap(List) noexcept -> TypeList> { return {}; }\ - template< template class Container, template class List, class...Elems, typename...Elements>\ - constexpr auto rewrap(List,Elements...) noexcept -> decltype(append(TypeList>{}, rewrap(Elements{}...))) { return {}; }\ - \ - template