Commit Graph

1746 Commits

Author SHA1 Message Date
martin-s
299c7c730c Introduce new policy to skip post verification of dll exports (#9642)
* - Introduce new policy to skip post verification of dll exports (see issue #9641).

* - Fixed line endings.
2020-01-13 16:31:58 -08:00
Maher Jendoubi
891a840ffa Contributing: Fix a typo (#9566) 2020-01-09 14:31:48 -08:00
Curtis J Bezault
7b61b7b515 Allow ARM64 to build x86 things (#9578) 2020-01-09 14:27:03 -08:00
dpoliarush
37265f7a45 [vcpkg] Removed unused template function. (#9287) 2019-12-20 17:26:40 -08:00
Robert Schumacher
cda348b6a3
Merge pull request #9080 from dan-shaw/telemetry-update
[vcpkg] update telemetry
2019-11-22 16:08:34 -08:00
dan-shaw
0a0440c1a8 update telemetry 2019-11-22 15:07:00 -08:00
Robert Schumacher
018c265d71 [vcpkg] Fix build breaks and run clang-format 2019-11-22 10:33:45 -08:00
Robert Schumacher
45f4b820e5
Merge branch 'master' into vcpkg_nuget 2019-11-22 09:47:40 -08:00
fradav
483257fbfb Update to clang 9.* (removed libc++fs) (#8924) 2019-11-21 17:11:57 -08:00
dan-shaw
552296a741 [vcpkg] update telemetry 2019-11-14 13:12:36 -08:00
Sergey Zolotarev
78c0fd26c4 Fix compile error in Visual Studio 2017 15.1 2019-10-17 15:23:15 +06:00
Joel Pelaez Jorge
db3e74fa9c Fix CMake checks for Apple Clang 11.0 on macOS 10.15 (#8580)
* Fix CMake checks for Apple Clang 11.0 on macOS 10.15

* Use clang++ instance clang if allowAppleClang is enabled
2019-10-14 16:04:05 -07:00
Chris-SG
9f26ae8bf0 Find default for text/plain on Linux and Windows (#567) (#8435)
* Find default for text/plain on machines with xdg (#567)

* Add unicode aware detection of text/plain on windows
2019-10-07 21:00:59 -07:00
Phil Christensen
2f4cb2d5be
[CI system] Add features to test result xml (#8342)
* Add features to test result xml
2019-09-26 11:10:26 -07:00
Alexander Neumann
54173e7fe2 Fix #8193 (#8200) 2019-09-17 09:55:47 -07:00
Phoebe
b4a0c8d574 [vcpkg] Continue on malformed paths in PATH (#8129)
Previously vcpkg would exit on malformed paths. We now will continue and ignore the malformed path.
2019-09-17 09:35:50 -07:00
martin-s
191c864927 Fix bug in .vcpkg-root detection that breaks --overlay-triplets (#7954)
* - Added scripts variable to ports file.
- Added check if triplet file is not available (NPE).

* - Fixed line endings.

* Provide location of .vcpkg-root to ports.cmake

* vcpkg sets VCPKG_ROOT_PATH in ports.cmake

* [vcpkg] Fail if VCPKG_ROOT_PATH is not passed from vcpkg.exe

* [vcpkg] Fix vcpkg rooth path

* [vcpkg] Make --x-scripts-root an experimental command
2019-09-12 23:52:52 -07:00
Victor Romero
cb0fc1a5f9
[vcpkg] Fix depend-info command arguments (#8135) 2019-09-11 11:10:31 -07:00
JackBoosY
90c3f80fff fix x-history help desc. (#8101) 2019-09-09 08:53:24 -07:00
Victor Romero
84ba23ad33
[x-history] Prints CONTROL version history of a port 👻 (#7377)
* [port-history] Print port CONTROL version history

* Add commands.porthistory.cpp to VS project

* Get most recent commit for each version

* Apply clang-format

* Fix output format

* Rename command to x-history
2019-09-06 11:35:56 -07:00
Victor Romero
f5c732b40d
Download Mode (#7950)
* [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

* Fix calls to _execute_process() when not in Download Mode
2019-08-28 13:49:29 -07:00
Victor Romero
4b404e8cfb
Revert "[vcpkg install] Enable Download Mode (#7797)" (#7949)
This reverts commit 65d4bc146b.
2019-08-28 11:59:30 -07:00
Victor Romero
65d4bc146b
[vcpkg install] Enable Download Mode (#7797)
* [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-28 11:47:17 -07:00
nicole mazzuca
32a53e1f37 [vcpkg] fix bug in StringView::operator== 😱 (#7930)
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 14:03:49 -07:00
Phil Christensen
0eb7305102
[vcpkg] fix list parsing logic and add error messages
fix list parsing logic and add error messages
2019-08-27 11:00:37 -07:00
Phil Christensen
8bae937e17 avoid assembling error strings unless there is an error 2019-08-26 16:39:38 -07:00
Phil Christensen
6d8e66ff4f Run clang-format and add more error messages 2019-08-26 16:21:57 -07:00
Nicole Mazzuca
7827239593 (#7757) [vcpkg] Switch to internal hash algorithms 📜
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-26 12:35:22 -07:00
Robert Schumacher
373aeff922 [vcpkg] Move do_build_package_and_clean_buildtrees() above generating cpkg_abi_info.txt so it will be included in the package. (#7864) 2019-08-24 13:01:57 -07:00
Phil Christensen
bd4678610b
Merge branch 'master' into multi_line_depends 2019-08-23 11:18:34 -07:00
Phil Christensen
1245f1dbfc [vcpkg] bump version 2019-08-23 11:05:56 -07:00
Phil Christensen
13c95f16bf clean up list parsing logic and add clear warnings 2019-08-23 10:20:18 -07:00
Nicole Mazzuca
cc35672763 (#7798) [vcpkg] Fix the build on FreeBSD 😈
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-23 07:01:03 -07:00
Curtis J Bezault
94ef325828
[vcpkg] Fix gcc-9 warning (#7816)
* drop one usage of span in export. Span is not appropriate for rvalues

* Add back reference

* Fix @ubsan 's comments
2019-08-21 14:23:15 -07:00
Phil Christensen
051a6fd5b3 [boost] split Build-Depends on multipls lines 2019-08-21 13:48:47 -07:00
Curtis J Bezault
4da95d667c
[vcpkg]Port toolchains (#7687)
* 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-20 08:47:26 -07:00
Phil Christensen
5a1e992023
[vcpkg] allow multiple spaces in a comma list (#7754) 2019-08-19 13:49:44 -07:00
Nicole Mazzuca
300e21d59e [vcpkg] Major tool CMakeLists.txt updates
- 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-16 19:40:53 -07:00
Curtis J Bezault
b47ca1b012
Merge pull request #7305 from cbezault/external_file_abi
[vcpkg] Public ABI override option
2019-08-16 13:51:22 -07:00
Victor Romero
edaf3bf91e
[depend-info] Fix bugs, add --sort, --show-depth and --max-recurse 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-14 15:38:07 -07:00
Alexander Neumann
f9c92910a7 Change CMakeLists.txt in toolsrc to allow compiling with llvm toolset (#4572)
* 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-14 14:06:00 -07:00
nicole mazzuca
875648e10b [vcpkg] Fix the build on VS2015 debug (#7637)
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-12 14:02:59 -07:00
Curtis.Bezault
c605f4eea6 drop uneeded parameter from create_binary_control_file 2019-08-12 11:40:03 -07:00
Curtis.Bezault
44e08d28e7 remove uneeded header 2019-08-12 11:19:16 -07:00
Curtis.Bezault
5c11033ad7 Fix formatting, hash override, don't move pre_build_info 2019-08-12 10:22:05 -07:00
Nicole Mazzuca
29ddf1a5c2 remove clever use of std::ignore 2019-08-10 13:13:21 -07:00
Nicole Mazzuca
58f95cc856 fix two bugs in status 2019-08-10 13:13:21 -07:00
Nicole Mazzuca
420dbffaa0 clang-format, and fix a leftover 2019-08-10 13:13:21 -07:00
Nicole Mazzuca
a6ae888f4e fix the build on unix 2019-08-10 13:13:21 -07:00
Nicole Mazzuca
52b2e740de [vcpkg] Fix build under /W4
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-10 13:13:21 -07:00
Curtis.Bezault
5bd45366fb Add public abi override into the private abi 2019-08-09 15:15:22 -07:00
Curtis.Bezault
f0dd7b6296 fix missing abi key mistake 2019-08-09 14:51:16 -07:00
Curtis.Bezault
f9561a08db remove unnecessary include, fix variable extraction 2019-08-09 14:47:58 -07:00
Curtis.Bezault
ad82c38cc1 Actually only override the PUBLIC ABI, not the private one 2019-08-09 14:40:09 -07:00
Curtis.Bezault
724055b4e2 Merge branch 'external_file_abi' of github.com:cbezault/vcpkg into external_file_abi 2019-08-09 14:22:20 -07:00
Curtis.Bezault
0c7d8f4146 Change purpose of this PR to just overriding the abi 2019-08-09 14:21:58 -07:00
Curtis J Bezault
6c1423f41d
Merge branch 'master' into external_file_abi 2019-08-09 15:06:54 -04:00
Nicole Mazzuca
67643a0ea3 [vcpkg] fix 7616
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 10:48:37 -07:00
Robert Schumacher
14c792441d [vcpkg] Revert accidental removal of powershell-core usage in bb3a9ddb6e 2019-08-09 10:47:15 -07:00
Curtis J Bezault
c4f1a91ef2
Merge branch 'master' into external_file_abi 2019-08-09 11:59:32 -04:00
Nicole Mazzuca
e79f0dc532 [vcpkg] Make Filesystem::remove_all faster #7570
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-07 16:51:12 -07:00
Phil Christensen
22e0b9f376
improve logic expression evaluation (#7508)
* 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-02 21:37:49 -07:00
nicole mazzuca
165907550c
Update tests, and add documentation! (#7506)
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-02 09:52:39 -07:00
lukka
ae6ca87221 - remove trailing \r when parsing response file that might have Windows 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-08-01 17:48:22 -07:00
nicole mazzuca
f990dfaa5b [vcpkg] Fix RealFilesystem::remove_all (#7430)
* 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-26 16:32:33 -07:00
Curtis.Bezault
9da7c5c99e Make comment better 2019-07-25 09:38:05 -07:00
Curtis.Bezault
f81aa47176 convert path to string 2019-07-24 14:53:50 -07:00
Curtis.Bezault
67a749b989 turn path into string 2019-07-24 14:46:55 -07:00
Curtis.Bezault
be59ecce61 Use correct types 2019-07-24 14:43:44 -07:00
Curtis J Bezault
d60047280d
Merge branch 'master' into external_file_abi 2019-07-24 14:26:34 -07:00
Curtis.Bezault
0c7669d009 store fs::path instead of std::string 2019-07-24 14:24:49 -07:00
nicole mazzuca
aeecc01fbd Modify CMakeLists to split up vcpkglib (#7407)
Before this, we had vcpkg and vcpkg-test taking the vcpkglib source
files directory -- this commit makes vcpkglib an object library.
2019-07-24 13:50:45 -07:00
Curtis.Bezault
d68b9a08b1 only use filename 2019-07-23 16:28:00 -07:00
Curtis.Bezault
45cd8cda5a move the pre_build_info 2019-07-23 15:49:48 -07:00
Curtis.Bezault
81909e47d1 Remove types from this PR 2019-07-23 15:38:09 -07:00
Curtis.Bezault
829f99b506 remove needs_rebuild from statusparagraphs 2019-07-23 15:36:13 -07:00
Curtis.Bezault
f64d2e9103 remove accidental comment 2019-07-23 15:33:36 -07:00
Curtis.Bezault
e181376604 fix condition 2019-07-23 15:31:53 -07:00
Curtis.Bezault
62ec13ba36 Merge build.cpp 2019-07-23 15:29:49 -07:00
Curtis.Bezault
2f2a45595f Prompt rebuild if external hash changes 2019-07-23 15:26:13 -07:00
Curtis.Bezault
459908ae14 add external file hashes to the binary paragraph 2019-07-23 10:07:39 -07:00
Nicole Mazzuca
2c20a9d981 fix some of the awful mix of macros 2019-07-22 12:29:17 -07:00
Nicole Mazzuca
0d8bba52e4 allow tests to run on older standard libraries 2019-07-19 23:20:28 -07:00
Nicole Mazzuca
c55ea0a0d5 switch to new test framework 2019-07-19 12:56:24 -07:00
Nicole Mazzuca
b3caf67749 Merge branch 'trunk' into parallel-file-ops 2019-07-19 12:17:22 -07:00
Curtis J Bezault
3b808a48ce
Update VERSION.txt 2019-07-19 08:08:56 -07:00
Curtis J Bezault
18c849daea
Merge branch 'master' into external_file_abi 2019-07-19 08:08:08 -07:00
Curtis J Bezault
618fa203c1
[vcpkg] Portfile Settings (#7292) 2019-07-19 08:01:38 -07:00
nicole mazzuca
8250553789 Rewrite the tests! now they're cross-platform! (#7315)
* 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-07-18 19:07:00 -07:00
Nicole Mazzuca
fddebb75da clang-format all the things 2019-07-18 19:03:46 -07:00
Curtis J Bezault
9b5ee99412
Update VERSION.txt 2019-07-18 16:20:00 -07:00
Dan Nissenbaum
ef48500ac6 Better error message when VCPKG_ROOT is independently defined (#7229) 2019-07-18 13:53:24 -07:00
Curtis.Bezault
d39bd70d53 add needs_rebuild, should probably be moved to somewhere else 2019-07-18 13:24:31 -07:00
Curtis J Bezault
bb3a9ddb6e
[vcpkg] Environment Variable Passthrough (#7290)
* use additional env param

* remove partials

* remove change to linux triplet

* Fix some issues that vicroms pointed out

* whitespace change
2019-07-18 09:02:21 -07:00
Nicole Mazzuca
f599f19bad tests.files.cpp:create_directory_tree -- change magic numbers to names 2019-07-17 18:58:23 -07:00
Curtis.Bezault
f18ffe9968 Add type field 2019-07-17 16:04:05 -07:00
Curtis.Bezault
58958eb0ea sourceparagraph changes 2019-07-17 14:27:18 -07:00
Curtis.Bezault
f0f615532f always calculate abi 2019-07-17 11:40:27 -07:00
Curtis.Bezault
e81d22ddec Convert name of file to u8 string, to compile on windows 2019-07-17 10:18:20 -07:00
Curtis.Bezault
d4ab567609 first pass at abi additional files 2019-07-17 10:10:36 -07:00