aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg.cpp
AgeCommit message (Collapse)Author
2021-02-04[vcpkg] Download vcpkg.exe rather than building it in bootstrap on Windows. ↵Billy O'Neal
(#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.
2021-02-03[vcpkg] Apply fixes needed to extract vcpkg-tool (#16012)Billy O'Neal
utilities.cmake: Disable warnings that are firing on Azure Pipelines CI machines due to different Clang version. expected.h: Fix a bug I introduced in https://github.com/microsoft/vcpkg/pull/15638/ because I was under the impression expected worked like optional (in that value_or_exit for it should be treated as a program bug) build.cpp: Add (void)s to silence warnings. binarycaching.cpp: Repair assumption that the current directory is C: which isn't true on the Hosted Azure Pipelines agents. others: Make unit tests respect %VCPKG_ROOT%, as necessary in the vcpkg_tool repo. Note that this required splitting vcpkgcmdarguments::ImbueFromEnvironment into the once-only process modifying part and the just imbue from environment part.
2021-01-22[vcpkg,boost-modular-build-helper] initial ppc64le community support (#15572)Andrei Lebedev
* [vcpkg] initial ppc64le community support Signed-off-by: Andrei Lebedev <lebdron@gmail.com> * [boost-modular-build-helper] ppc64le support Signed-off-by: Andrei Lebedev <lebdron@gmail.com> * Merge from master Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: dan-shaw <51385773+dan-shaw@users.noreply.github.com> Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
2021-01-20[vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (#15638)Billy O'Neal
2021-01-14[vcpkg] Fix incorrect handling of messages for permenantly disabled metrics. ↵Billy O'Neal
(#15636) Fixes #15630
2021-01-13[vcpkg] Use a tag file rather than conditional compilation to permanently ↵Billy O'Neal
disable metrics. (#15470)
2020-12-14[vcpkg] Disable survey message (#14954)ras0219
2020-12-11[vcpkg] Don't require native tools on arm64 macOS (#15045)Owen Rudge
2020-10-24Replace fwd header files to declarations (#13972)Cengizhan Pasaoglu
2020-10-08[vcpkg] Use more forward declarations rather than definitions (#13623)Cengizhan Pasaoglu
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-10-06[vcpkg] Enable reentrant vcpkg calls (#13751)ras0219
* [vcpkg] Enable recursive vcpkg calls Via envvars VCPKG_COMMAND and VCPKG_X_RECURSIVE_DATA. Child processes can call vcpkg via "$VCPKG_COMMAND <args>" in limited internal circumstances. * [vcpkg] Address CR comments * [vcpkg] Do not move through Optional<&> into Optional<T> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-09[vcpkg] improve s390x support (#13386)Andrei Lebedev
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
2020-09-05Add community triple arm64-linux and arm-linux. (#11880)xyb
Verify the following command on both 32 bits and 64 bits OS on Raspberry pi 3. ./bootstrap-vcpkg.sh ./vcpkg install boost
2020-08-13[vcpkg] Lift `--x-json` to a global option, implement experimental ↵ras0219
`x-package-info` command (#12845) * [vcpkg] Improve error reporting in vcpkg::Json * [vcpkg] Lift --x-json to a common option * [vcpkg] Address warnings-as-errors in VS2015 * [vcpkg] Remove unused local * [vcpkg] Extract vcpkg::Install::get_cmake_usage * [vcpkg] Implement vcpkg::serialize_ipv(ipv, paths) * [vcpkg] Implement x-package-info to enable tooling * [vcpkg] Fixup tests to respect new cli mode Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-08-01[vcpkg] Refactor commands 2: Electric Boogaloo (#12641)nicole mazzuca
* Add BasicCommand and VersionCommand * Add ContactCommand * test get_available_commands_type_c * Change get_available_commands_type_c to return objects * Add TripletCommand & InstallCommand * Add SetInstalledCommand * add linking tests * Add CICommand * Add remaining *Command objects * Add tests for commands_type_a * Move over to using const TripletCommand* for commands_type_a * Add PathsCommand * Add SearchCommand * add test for commands_type_b * add *Command for all type b commands * Switch from function pointers to PathsCommand for everything * format * rename get_available_commands also remove CommandType* types
2020-07-31[vcpkg] Refactor Commands: Part 1 (#12585)nicole mazzuca
* Rename commands.exportifw.cpp -> export.ifw.cpp * move DryRun from commands.h -> commands.interface.h * move vcpkgcmdarguments and vcpkgpaths over to commands.interface.h * move vcpkg::Commands::BuildExternal -> commands.buildexternal.h * add commands.*.h for the commands.*.cpp * move vcpkg::Commands::* to commands.*.h * move vcpkg::Commands::{Hash,Fetch} to their own files * change include commands.h -> commands.*.h in commands.*.cpp * remove commands.*.h from commands.h * join vcpkg::Commands::* into one namespace line * fix vcxproj build
2020-07-11[vcpkg formatting] Fix format regex (#12369)nicole mazzuca
* [vcpkg formatting] correct the header regexes * format
2020-07-09[vcpkg manifests] fix some issues (#12227)nicole mazzuca
Fixes #12190 Fixes #12208 Fixes #12234 Fixes #12286 Fixes #12315 Fixes #12186 Fixes #12331 Fixes googleapis/google-cloud-cpp#4487
2020-07-06[vcpkg] Format the C++ in CI (#11655)nicole mazzuca
* [vcpkg] Format the C++ in the CI * format the C++ * CR
2020-06-30[vcpkg manifest] Manifest Implementation (#11757)nicole mazzuca
==== Changes Related to manifests ==== * Add the `manifests` feature flag * This only says whether we look for a `vcpkg.json` in the cwd, not whether we support parsing manifests (for ports, for example) * Changes to the manifests RFC * `"authors"` -> `"maintainers"` * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags` * reserve `"core"` in addition to `"default"`, since that's already reserved for features * Add a small helper note about what identifiers must look like * `<license-string>`: SPDX v3.8 -> v3.9 * `"feature"."description"` is allowed to be an array of strings as well * `"version"` -> `"version-string"` for forward-compat with versions RFC * Add the `--feature-flags` option * Add the ability to turn off feature flags via passing `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags` * Add CMake toolchain support for manifests * Requires either: * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}` or `VCPKG_FEATURE_FLAGS` * Passing the `VCPKG_ENABLE_MANIFESTS` option * The toolchain will install your packages to `${VCPKG_MANIFEST_DIR}/vcpkg_installed`. * Add MSBuild `vcpkg integrate install` support for manifests * Requires `VcpkgEnableManifest` to be true * `vcpkg create` creates a port that has a `vcpkg.json` instead of a `CONTROL` * argparse, abseil, 3fd, and avisynthplus ports switched to manifest from CONTROL * Add support for `--x-manifest-root`, as well as code for finding it if not passed * Add support for parsing manifests! * Add a filesystem lock! ==== Important Changes which are somewhat unrelated to manifests ==== * Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}` * Add `PlatformExpression` type which takes the place of the old logic expression * Split the parsing of platform expressions from checking whether they're true or not * Eagerly parse PlatformExpressions as opposed to leaving them as strings * Add checking for feature flag consistency * i.e., if `-binarycaching` is passed, you shouldn't be passing `--binarysource` * Add the `Json::Reader` type which, with the help of user-defined visitors, converts JSON to your internal type * VcpkgArgParser: place the switch names into a constant as opposed to using magic constants * In general update the parsing code so that this ^ works * Add `Port-Version` fields to CONTROL files * This replaces the existing practice of `Version: <my-version>-<port-version>` ==== Smaller changes ==== * small drive-by cleanups to some CMake * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` -> `${CURRENT_INSTALLED_DIR}` * Remove `-analyze` when compiling with clang-cl, since that's not a supported flag (vcpkg's build system) * Add a message about which compiler is detected by vcpkg's build system machinery * Fix `Expected::then` * Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`) * Add `Strings::strto` which converts strings to numeric types * Support built-in arrays and `StringView` for `Strings::join` * Add `operator<` and friends to `StringView` * Add `substr` to `StringView` * SourceParagraphParser gets some new errors
2020-06-25[vcpkg build] fix build command (#12072)nicole mazzuca
2020-06-15[vcpkg] Delete g_binary_caching global that should be passed as a parameter. ↵Billy O'Neal
(#11958)
2020-06-03[vcpkg] Allow CI to pass in all relevant directories and remove use of ↵Billy O'Neal
symbolic links (#11483)
2020-05-29[vcpkg metrics] Allow someone to opt out after build (#11542)nicole mazzuca
* [vcpkg metrics] start using json library Additionally, add floats to the JSON library since they're required. * [vcpkg metrics] allow users to disable metrics after the build Additionally, as a drive by, fix UUID generation * fix metrics data * code review
2020-05-20[vcpkg] fix extern C around ctermid (#11343)nicole mazzuca
Additionally, move the system_header invocations to their own header file, <vcpkg/base/system_header.h>
2020-05-19[vcpkg] Optimize string split slightly. (#11433)Billy O'Neal
2020-05-14[vcpkg] Turn on tests and PREfast in CI, and fix tests to pass. (#11239)Billy O'Neal
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-05-08[vcpkg] Resolve relative overlay ports to the current working directory. ↵Robert Schumacher
(#11233) Fixes #10771.
2020-04-17[vcpkg] Add x-set-installed command (#10817)nicole mazzuca
This command takes a list of ports, and causes the final state of the installed directory to be as-if one ran the install on an empty installed directory (removing any unnecessary packages). This is especially useful with the new `--x-install-root` option, which allows one to set the `installed` directory for vcpkg to use. Additionally, as a drive-by, we do some `stdfs` clean-up and add a `.is_feature()` member function to BinaryParagraph (as opposed to checking for `.feature().empty()`, which is far less clear to read). This feature is experimental.
2020-03-10[vcpkg] Introduce Job Objects to improve ctrl-c performance on WindowsRobert Schumacher
2020-01-17Add support for building with MinGW (#9137)Cristian Adam
* Add support for building with MinGW Tested with MSYS2 MinGW 8.3.0, gcc-mcf.lhmouse MinGW 9.2.1, and StephanTLavavej/mingw-distro! * Add MinGW toolchain From your MinGW configured shell you could just use vcpkg to configure packages. An x64-mingw triplet would look like: ``` set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_ENV_PASSTHROUGH PATH) set(VCPKG_CMAKE_SYSTEM_NAME MinGW) ``` * Add MinGW community tripplets x64 tested with https://github.com/StephanTLavavej/mingw-distro x86, arm64, arm tested with https://github.com/mstorsjo/llvm-mingw
2020-01-17Community Triplets 🤝 (#7976)Victor Romero
* Move untested triplets to Community Triplets * Document community triplets * Load community triplets by default and alert when using one * [triplets] Merge documentation of community triplets * Bump version
2019-11-14[vcpkg] update telemetrydan-shaw
2019-08-16[vcpkg] Major tool CMakeLists.txt updatesNicole Mazzuca
- Add the "VCPKG_DEVELOPMENT_WARNINGS" flag - setting "WERROR" will also set this flag - This flag is set by default - on GCC/clang, this will pass '-Wall -Wextra -Wpedantic -Werror' - on GCC, this will additionally pass '-Wmissing-declarations' - on clang, this will additionally pass '-Wmissing-prototypes' - on MSVC, this will pass '-W4 -WX' - On Visual Studio 2017 and later, pass '-permissive-' - Change the source for fallout of these changes - add `format` subcommand - formats all C++ source and header files using clang-format - move `include/vcpkg-test/catch.h` to `include/catch2/catch.hpp` - pass CONFIGURE_DEPENDS to file(GLOB)
2019-08-07[vcpkg] Make Filesystem::remove_all faster #7570Nicole Mazzuca
I added benchmarks to measure how fast the parallel remove_all code was -- it turns out, about 3x slower than stdfs::remove_all. Since this was the case, I removed all of the parallelism and rewrote it serially, and ended up about 30% faster than stdfs::remove_all (in addition to supporting symlinks). In addition, I did the following three orthogonal changes: - simplified the work queue, basing it on Billy O'Neal's idea - Fix warnings on older versions of compilers in tests, by splitting the pragmas out of pch.h. - Ran clang-format on some files In fixing up remove_all, the following changes were made: - On Windows, regular symlinks and directory symlinks are distinct; as an example, to remove directory symlinks (and junctions, for that matter), one must use RemoveDirectory. Only on Windows, I added new `file_type` and `file_status` types, with `file_type` including a new `directory_symlink` enumerator, and `file_status` being exactly the same as the old one except using the new `file_type`. On Unix, I didn't make that change since they don't make a distinction. - I added new `symlink_status` and `status` functions which use the new `file_status` on Windows. - I made `Filesystem::exists` call `fs::exists(status(p))`, as opposed to the old version which called `stdfs::exists` directly. - Added benchmarks to `vcpkg-test/files.cpp`. They test the performance of `remove_all` on small directories (~20 files), with symlinks and without, and on large directories (~2000 files), with symlinks and without.
2019-07-18Better error message when VCPKG_ROOT is independently defined (#7229)Dan Nissenbaum
2019-07-01Allow redirection of the scripts folder. (#6552)martin-s
* Allow redirection of the scripts folder with an environment variable. * - Updated feature from environment variable to argument. * Fix crash when no scripts override is given and use --scripts-root=<PATH> format * Update help messages to use --scripts-root=<PATH> format
2019-06-27Triplets Overlay Implementation (#7053)Victor Romero
* Triplets Overlay Implementation * Use cache for get_triplet_file_path() * Code cleanup
2019-06-12Protect #pragma comment(lib, "foo") with _WIN32 checks (#6867)İsmail Dönmez
lld on Linux can now process #pragma comment(lib, "foo") macros which results in build failures on Linux when lld is used. Fix this by protecting these macros with _WIN32 checks.
2019-06-08[vcpkg] Apply clang format (#6826)Robert Schumacher
2019-05-18[vcpkg] Fix regression in `--debug`. Remove old `features` featureflag. (#6507)Robert Schumacher
2019-04-23Add exit code (#6175)Curtis J Bezault
* Add exit_fail to vcpkg.cpp * Adding a comment as per @rastaban
2019-04-08[vcpkg] Synchronize vcpkg-base with external repo (#5934)Robert Schumacher
2019-02-05[vcpkg] Respect the documented VS environment variable ↵Robert Schumacher
%VCPKG_VISUAL_STUDIO_PATH%
2018-12-12[vcpkg] Add support for muslc, static crt linkage, and forcing the system ↵Robert Schumacher
binaries for cmake and ninja
2018-10-17Survey times. Refactor Chrono stuff. All times UTC, unless explicitly mentionedAlexander Karatarakis
Survey is set to be every 6 months, but you also get one in the first 10 days.
2018-10-17Survey prompts are now shown only for intall/remove/export/updateAlexander Karatarakis
2018-10-16[vcpkg] Wrap all external process spawning in a Ctrl-C catcher to avoid ↵Robert Schumacher
corrupted consoles
2018-07-09[vcpkg] Split vcpkg::Commands::Fetch into backend and frontendRobert Schumacher
2018-05-03[vcpkg] Remove utf16 usage from non-WindowsRobert Schumacher