aboutsummaryrefslogtreecommitdiff
path: root/toolsrc
AgeCommit message (Collapse)Author
2019-08-28Revert "[vcpkg install] Enable Download Mode (#7797)" (#7949)Victor Romero
This reverts commit 65d4bc146bf7c1c21989b680497b1f6f9a09c967.
2019-08-28[vcpkg install] Enable Download Mode (#7797)Victor Romero
* [portfile functions] Override execute_process() to accept ALLOW_IN_DOWNLOAD_MODE option * [vcpkg install] Set VCPKG_DOWNLOAD_MODE when using --only-downloads option * [vcpkg_find_acquire_program] Allow in Download Mode * Don't stop when build fails for a package * Download sources for all packages in dependency graph * Improve output messages * Enable acquiring MSYS packages in download mode * Documentation * Update documentation * execute_process() always fails on Download Mode * Regenerate docs and fix formatting * Run clang-format * Use _execute_process on vcpkg_from_<source> helpers
2019-08-27[vcpkg] fix bug in StringView::operator== 😱 (#7930)nicole mazzuca
Before this change, `lhs == rhs` missed the check for `lhs.size() == rhs.size()`, and then did a `memcmp` on the buffers up to `lhs.size()`. This means that, if `lhs.size() < rhs.size()`, it would allow two unequal strings to compare equal if, up to `lhs.size()` they are the same; and if `lhs.size() > rhs.size()`, then it would read out of bounds.
2019-08-27[vcpkg] fix list parsing logic and add error messagesPhil Christensen
fix list parsing logic and add error messages
2019-08-26avoid assembling error strings unless there is an errorPhil Christensen
2019-08-26Run clang-format and add more error messagesPhil Christensen
2019-08-26(#7757) [vcpkg] Switch to internal hash algorithms 📜Nicole Mazzuca
On non-Windows platforms, there is no standard way to get the hash of an item -- before this PR, what we did was check for the existence of a few common utility names (shasum, sha1, sha256, sha512), and then call that utility on a file we created containing the contents we wish to hash. This PR adds internal hashers for sha1, sha256, and sha512, and standardizes the interface to allow anyone to implement hashers in the future. These hashers are not extremely optimized, so it's likely that in the future we could get more optimized, but for now we just call out to BCryptHasher on Windows, since it's standard and easy to use (and about 2x faster for sha1 and sha256, and 1.5x faster for sha512). However, they are reasonably fast for being unoptimized. I attempted a few minor optimizations, which actually made the code slower! So as of right now, it's implemented as just a basic conversion of the code on Wikipedia to C++. I have tested these on the standard NIST test vectors (and those test vectors are located in vcpkg-test/hash.cpp).
2019-08-24[vcpkg] Move do_build_package_and_clean_buildtrees() above generating ↵Robert Schumacher
cpkg_abi_info.txt so it will be included in the package. (#7864)
2019-08-23Merge branch 'master' into multi_line_dependsPhil Christensen
2019-08-23[vcpkg] bump versionPhil Christensen
2019-08-23clean up list parsing logic and add clear warningsPhil Christensen
2019-08-23(#7798) [vcpkg] Fix the build on FreeBSD 😈Nicole Mazzuca
Add a `#else` line to `toolsrc/src/vcpkg/base/files.cpp`. On Linux and macOS, there are specific ways to copy from file descriptor to file descriptor, but on FreeBSD there isn't (as far as I could tell). This change does a copy using the POSIX standard `read` and `write` calls. (This change was to `RealFilesystem::rename_or_copy`). We expect to have people on FreeBSD install CMake themselves, and use `./bootstrap.sh -useSystemBinaries`, in order to build vcpkg. Since CMake 3.15.2 exists in the FreeBSD 12 (latest stable) package manager, it's trivial to install it.
2019-08-21[vcpkg] Fix gcc-9 warning (#7816)Curtis J Bezault
* drop one usage of span in export. Span is not appropriate for rvalues * Add back reference * Fix @ubsan 's comments
2019-08-21[boost] split Build-Depends on multipls linesPhil Christensen
2019-08-20[vcpkg]Port toolchains (#7687)Curtis J Bezault
* checkpoint commit * Only set VCPKG_ENV_OVERRIDES_FILE if it exists * First pass at working port-toolchain * Update VERSION.txt * Return rvalue * Fix compilation error * Some fixes are requested by @ubsan * Fix another compilation error
2019-08-19[vcpkg] allow multiple spaces in a comma list (#7754)Phil Christensen
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-16Merge pull request #7305 from cbezault/external_file_abiCurtis J Bezault
[vcpkg] Public ABI override option
2019-08-14[depend-info] Fix bugs, add `--sort`, `--show-depth` and `--max-recurse` ↵Victor Romero
options (#7643) * [depend-info] Follow same rules as vcpkg install * [depend-info] Add --max-depth and --sort options * [depend-info] Improve output readability (a tiny bit) * [depend-info] Add --show-depth option * [depend-info] Fix build on VS 2015 * [depend-info] Fix output of --dot and --dgml
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-12[vcpkg] Fix the build on VS2015 debug (#7637)nicole mazzuca
The VS2015 standard library requires, in debug mode, a comparison operator on `T × U` and `U × T` to also be a comparison operator on `T × T` and on `U × U`, and so in vcpkg::Install::install_package::intersection_compare, I've added two new `operator()` overloads which take those respectively, on VS2015. Also, `[nodiscard]` was added to somewhere in `vcpkg/base/strings.h`, which gives a warning in VS2015 -- thus, I added the `vcpkg/pragmas.h` include, since that fixes the warning.
2019-08-12drop uneeded parameter from create_binary_control_fileCurtis.Bezault
2019-08-12remove uneeded headerCurtis.Bezault
2019-08-12Fix formatting, hash override, don't move pre_build_infoCurtis.Bezault
2019-08-10remove clever use of std::ignoreNicole Mazzuca
2019-08-10fix two bugs in statusNicole Mazzuca
2019-08-10clang-format, and fix a leftoverNicole Mazzuca
2019-08-10fix the build on unixNicole Mazzuca
2019-08-10[vcpkg] Fix build under /W4Nicole Mazzuca
I was building under /W3, because CMake hadn't been set up to build under /W4 -- therefore, I didn't see some warnings. We also decided to remove the niebloids and instead break ADL by using `= delete`, since otherwise we get warnings when we define a local variable with the same name as a niebloid. I also removed `status` and `symlink_status` from the `files` header, since it's unnecessary now, and they're just implementation details of `RealFilesystem`. I also removed some existing uses of unqualified `status(path)`, since that no longer compiles. I also added `Filesystem::canonical`, to remove another use of `fs::stdfs` in a function I was already working in.
2019-08-09Add public abi override into the private abiCurtis.Bezault
2019-08-09fix missing abi key mistakeCurtis.Bezault
2019-08-09remove unnecessary include, fix variable extractionCurtis.Bezault
2019-08-09Actually only override the PUBLIC ABI, not the private oneCurtis.Bezault
2019-08-09Merge branch 'external_file_abi' of github.com:cbezault/vcpkg into ↵Curtis.Bezault
external_file_abi
2019-08-09Change purpose of this PR to just overriding the abiCurtis.Bezault
2019-08-09Merge branch 'master' into external_file_abiCurtis J Bezault
2019-08-09[vcpkg] fix 7616Nicole Mazzuca
There's a bug in `std::experimental::filesystem::status` on libstdc++ -- it incorrectly sets its `error_code` when a file doesn't exist, or when a path doesn't exist. In order to get around this, `error_code` was cleared when the file doesn't exist, but it was not cleared when the path didn't exist. Note: in this case, I say "the file doesn't exist" when, if you look up "a/b/c", "a/b" exists but "c" doesn't. I say "the path doesn't exist" when, if you look up "a/b/c", either "a" or "a/b" doesn't exist.
2019-08-09[vcpkg] Revert accidental removal of powershell-core usage in bb3a9ddb6ec917f54Robert Schumacher
2019-08-09Merge branch 'master' into external_file_abiCurtis J Bezault
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-02improve logic expression evaluation (#7508)Phil Christensen
* better logic expression evaluation Improve the logic expression evaluation currently used when filtering dependencies. Biggest improvements: + Allow '|' operator + Support nested '()' + Allow whitespace + Useful error message for malformed expressions Also changed names of types to RawParagraph when that is what the original author was using.
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-08-01 - remove trailing \r when parsing response file that might have Windows ↵lukka
line endings; (#7491) - when an option is not recognized (perhaps because it has trailing whitespace characters), print it out enclosed with single quote to delimit and highlight potenatial not printable characters.
2019-07-26[vcpkg] Fix RealFilesystem::remove_all (#7430)nicole mazzuca
* fix remove_all we were attempting to remove READONLY files before this, and so set them to non-READONLY * fix linux/macos support * whee fix vs2015
2019-07-25Make comment betterCurtis.Bezault
2019-07-24convert path to stringCurtis.Bezault
2019-07-24turn path into stringCurtis.Bezault
2019-07-24Use correct typesCurtis.Bezault
2019-07-24Merge branch 'master' into external_file_abiCurtis J Bezault
2019-07-24store fs::path instead of std::stringCurtis.Bezault