aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/CMakeLists.txt
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-01-20[vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (#15638)Billy O'Neal
2021-01-14[vcpkg registries] Add git registries (#15054)nicole mazzuca
* [vcpkg registries] Add git registries support * Add git registries support to the registries module of vcpkg. * add e2e tests for git registries * fix vcpkg.cmake for registries * fix CRs, remove a thing * better error messages * Billy CRs * fix Robert's CR comment * I learned about `-c` today * format * fix baseline.json * failing to find baseline is technically not a bug
2021-01-13[vcpkg] Use a tag file rather than conditional compilation to permanently ↵Billy O'Neal
disable metrics. (#15470)
2021-01-13[vcpkg] Add sources for TLS 1.2 downloader tool. (#15516)Billy O'Neal
2021-01-07[vcpkg] Restore embedded git hash behind an option. (#15472)Billy O'Neal
2020-09-21[vcpkg] Add build scripts to produce signed vcpkg binaries. (#13508)Billy O'Neal
2020-09-11[vcpkg] Merge the vcpkg metadata uploader into the vcpkg binary (#13421)Billy O'Neal
2020-09-02[vcpkg] Registries MVP (#13038)nicole mazzuca
2020-08-19[vcpkg] Add Forward Declarations (originally by @cngzhnp) (#12985)nicole mazzuca
Co-authored-by: cngzhnp <cengizhanpasaoglu@gmail.com>
2020-08-10[vcpkg] Rewrite CMake build system to be more target-based (#12698)nicole mazzuca
* Change to using more target-focused cmake * Add vcpkg_target_add_warning_options * targetify the rest * move the globs together * Force-include pch.h on non-windows * Rename VCPKGLIB_NON_PCH_* to VCPKGLIB_* in globs * Remove `include "pch.h"`s * missed a few lines * fix build * fix CMAKE_CURRENT_SOURCE_DIR * try to fix VCPKG_REQUIRE_LINK_CXXFS * change msvc-stl logic * fix build * CR * clang-format * Apply suggestions from code review Thanks @ras0219! Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
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-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-08Don't build the metrics uploader when metrics are disabled. (#11234)Billy O'Neal
2020-05-07[vcpkg] Restrict telemetry uploads to TLS 1.2 (#11213)Billy O'Neal
* [vcpkg] Restrict telemetry uploads to TLS 1.2, as required by Azure security policy. Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-04-29[vcpkg] Small touchups for vcpkg unit tests (#11068)Martin Hořeňovský
* Do not disable expression decomposition in some optional tests The tests are trivial enough that it is unlikely to come useful, but the old usage is bad practice. * Run tests in random order This should prevent committing tests that are run-order dependent, or at least shake them out eventually in CI.
2020-04-17[vcpkg] Add initial JSON support (#10521)nicole mazzuca
* [vcpkg] Add initial JSON support This adds a JSON parser, as well as the amount of unicode support required for JSON parsing to work according to the specification. In the future, I hope to rewrite our existing XML files into JSON. Additionally, as a drive-by, we've added the following: * add /wd4800 to pragmas.h -- this is a "performance warning", for when you implicitly convert pointers or integers to bool, and shouldn't be an issue for us. * Switched Parse::ParserBase to read unicode (as utf-8), as opposed to ASCII * Building again under VCPKG_DEVELOPMENT_WARNINGS, yay!
2020-04-14[vcpkg] Clean up CMake build system (#10834)nicole mazzuca
There are quite a few changes to the CMake build system packaged up into one set here: * Added `toolsrc/cmake/utilities.cmake`, which contains the following: * `vcpkg_detect_compiler` -- get the name of the C++ compiler, as one of {gcc, clang, msvc} * `vcpkg_detect_standard_library` -- get the name of the standard library we're linking to, as one of {libstdc++, libc++, msvc-stl} * `vcpkg_detect_std_filesystem` -- figure out how to link and call into C++17's filesystem; whether one needs to link to `stdc++fs` or `c++fs`, and whether to use `<filesystem>` or `<experimental/filesystem>`. * Added a `VCPKG_WARNINGS_AS_ERRORS`, split off from `VCPKG_DEVELOPMENT_WARNINGS`, which allows one to use the development warnings without passing -Werror * Rename `DEFINE_DISABLE_METRICS` to `VCPKG_DISABLE_METRICS` -- the former will now print a deprecation message and set the latter. * Now, print a deprecation message on `WERROR`; it doesn't do anything since the behavior it requested is now the default. * Pass `-std=c++17` if the compiler allows it, instead of `-std=c++1z` * Do some code movement * Pass `USE_STD_FILESYSTEM` if possible, instead of only on minGW * Renamed to `VCPKG_USE_STD_FILESYSTEM` Additionally, we now pass `/W4` in Debug mode on x86 in the Visual Studio build system; this brings it in line with the CMake build system, and the x64 Visual Studio build system. And finally, we make some minor code changes to support compiling in VCPKG_DEVELOPMENT_WARNINGS mode.
2020-02-08[vcpkg] Use CreateProcess on Windows. Improve EnvVars manipulation and ↵Robert Schumacher
handling. (#9897) * [vcpkg] Rewrite process spawning on windows to always use CreateProcess, enabling better environment handling * [vcpkg] Use environment cache to avoid calling vcvars multiple times * [vcpkg] Increase buffer size while computing hashes * [vcpkg] Remove unneeded cmd.exe wrapper process on all CreateProcess calls * [vcpkg] Fix .vcxproj{,.filters} * [vcpkg] Upgrade Ctrl-C state machine to handle multiple background processes. * [vcpkg] Fix regression while launching metrics: 'start' can't be passed directly to CreateProcessW * [vcpkg] Fix typo on non-Windows * [vcpkg] Fix various uses of >NUL across the code * [vcpkg] Fix various uses of >NUL across the code
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-16[toolsrc] Added missing @ to FATAL_ERROR message (#9720)Kristof
To install a specific version of a package via homebrew, an `@` symbol must be placed in-between the package name and its version. Added missing symbol to `toolsrc/CMakeLists.txt` See homebrew console output for reference: ``` Kristofs-Mac-Pro:vcpkg kristofdaja$ brew search gcc ==> Formulae gcc gcc@5 gcc@7 x86_64-elf-gcc gcc@4.9 gcc@6 gcc@8 ```
2019-11-21Update to clang 9.* (removed libc++fs) (#8924)fradav
2019-10-14Fix CMake checks for Apple Clang 11.0 on macOS 10.15 (#8580)Joel Pelaez Jorge
* Fix CMake checks for Apple Clang 11.0 on macOS 10.15 * Use clang++ instance clang if allowAppleClang is enabled
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-14Change CMakeLists.txt in toolsrc to allow compiling with llvm toolset (#4572)Alexander Neumann
* llvm warning pessimistic move * warning missing override * warning invalid noreturn. ::TerminateProcess ist not marked as noreturn! * use more modern cmake features instead of adding c++ standard by hand. * Normalize line endings * Fix add_executable() * Fix target commands * Clean up CMakeLists.txt
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-08-02Update tests, and add documentation! (#7506)nicole mazzuca
This PR does the following: * fix tests -- now, they're always built in the CMake scripts, and they work on VS2015 *add a new flag, BUILD_TESTING, which allows one to turn off testing builds * Add documentation for running tests
2019-07-24Modify CMakeLists to split up vcpkglib (#7407)nicole mazzuca
Before this, we had vcpkg and vcpkg-test taking the vcpkglib source files directory -- this commit makes vcpkglib an object library.
2019-07-19allow tests to run on older standard librariesNicole Mazzuca
2019-07-19switch to new test frameworkNicole Mazzuca
2019-07-18Rewrite the tests! now they're cross-platform! (#7315)nicole mazzuca
* begin exploratory rewriting of tests * continue working on tests * more test work! holy butts vcpkg-tests/plan.cpp was a bunch of work * finish writing new tests - [x] write catch2 tests - [ ] rewrite/at least delete the VS project files - [ ] document running tests * Fix tests to work on WSL, rewrite test vcxproj still need to test on macOS also, delete tests.pch.h * Condense add_test calls
2019-06-19[vcpkg] Improve vcpkg::Files::Filesystem error handling (#6919)Robert Schumacher
* [vcpkg] Modify Filesystem::remove and Filesystem::rename to not throw. * [.gitignore] Ignore new VS2019 CMake integration default location * [.gitignore] Ignore CMakeSettings.json in toolsrc * [vcpkg] Time external processes called with System::cmd_execute * [vcpkg] Work around VS2019 CMake bug * [vcpkg] Fix several unused variable warnings. * [vcpkg] Improve error handling in vcpkg::Files::Filesystem Always require either std::error_code or LineInfo to print better errors. * [vcpkg] Fixup missing return value. Drive by fix: silence warnings in tests. * [vcpkg] Fix exiting in error_code overload Drive by fixes for /analyze with VS2019
2019-05-13appleclang 10.01 does not have <filesystem> (#6413)lukka
support
2019-04-15Updated libc++fs link for libc++ 8.0 (#6029)fradav
2019-04-11Add -allowAppleClang option to bootstrap.sh. (fixes #4698) (#5915)soroshsabz
* Add -allowAppleClang option to bootstrap.sh. (fixes #4698) * [vcpkg-bootstrap] Simplify appleclang changes and reformat * [vcpkg-bootstrap] Remove enviroment variable VCPKG_ALLOW_APPLE_CLANG
2019-04-08[vcpkg] Synchronize vcpkg-base with external repo (#5934)Robert Schumacher
2019-03-05Fix vcpkg build with clang on Linux (#5360)Mathieu Ropert
2018-06-26[vcpkg] Link bcrypt via CMake on Windows (#3765)Konstantin Podsvirov
2018-06-11Improve disableMetrics propagation when consuming CMakeLists directlyAlexander Karatarakis
2018-06-08Add -disableMetrics for linuxAlexander Karatarakis
2018-04-12[vcpkg] Mark many types noexcept. Make certain code patterns more ↵Robert Schumacher
transparent to /analyze. #ifdef-out unused code on non-windows.
2018-03-30Improve message for appleclangAlexander Karatarakis
2018-03-29Add message for appleclang versions that don't support std::filesystemAlexander Karatarakis
2018-03-13[vcpkg] Link pthreadsRobert Schumacher
2018-03-02[vcpkg] Allow compilation via CMake with MSVC (#2935)Konstantin Podsvirov
2018-02-21[vcpkg] Enable metrics on linuxRobert Schumacher
2017-12-14[vcpkg] Fix regressions in WSL build.Robert Schumacher
2017-11-28[vcpkg] Further fix for clang/gccRobert Schumacher
2017-11-28[vcpkg] Use c++experimental in clangRobert Schumacher
2017-11-25[vcpkg] Allow compilation inside WSLRobert Schumacher