* - 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
* [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
* [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
* [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
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.
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).
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.
* 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
- 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)
* 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
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.
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.
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.
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.
* 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.
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
- 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.
* 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
* [vcpkg] Fix font corruption bug on Windows by downloading Powershell Core
* [vcpkg] Rename subtool to powershell-core
* [vcpkg] Add missing includes to project files
* 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
* [vcpkg_configure_cmake] Add NO_CHARSET_FLAG option
* [vcpkg_configure_cmake] Add documentation for new NO_CHARSET_FLAG option
* [vcpkg_configure_cmake, windows toolchain] Handle NO_CHARSET_FLAG in toolchain
* [build.cpp] Add Windows toolchain to package hash
* [duilib,msix,thrift,tidy-html5] Use NO_CHARSET_FLAG to fix regressions
VS 2019 16.3 will contain a couple of source-breaking changes:
* <experimental/filesystem> will be deprecated via an
impossible-to-miss preprocessor "#error The <experimental/filesystem>
header providing std::experimental::filesystem is deprecated by
Microsoft and will be REMOVED. It is superseded by the C++17
<filesystem> header providing std::filesystem. You can define
_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING to acknowledge
that you have received this warning."
* <filesystem> will no longer include <experimental/filesystem>.
In the long term, I believe that vcpkg should detect when it's being
built with VS 2017 15.7 or newer, compile in C++17 mode, include
<filesystem>, and use std::filesystem. (Activating this for VS 2019 16.0
or newer would also be reasonable.) Similarly for other toolsets
supporting std::filesystem.
In the short term, this commit makes vcpkg compatible with the upcoming
deprecation. First, we need to define the silencing macro before
including the appropriate header. I've chosen to define it
unconditionally (without checking for platform or version), since it
has no effect for other platforms or versions. Second, we need to deal
with <filesystem> no longer including <experimental/filesystem>.
I verified that VS 2015 Update 3 contained <experimental/filesystem>
(back then, it simply included the <filesystem> header, where the
experimental implementation was defined; this was later reorganized).
Therefore, all of vcpkg's supported MSVC toolsets have
<experimental/filesystem>, so we can simply always include it.
I've verified that this builds with both VS 2015 Update 3 and
VS 2019 16.1.3 (the current production version).
* [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
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.
* [control file] Add optional 'Homepage' tag
This allows a 'Homepage' tag to be added to a port in order to support
changes such as PR #2933. It currently does not do anything with it.
* [docs]
Add Homepage to the control file documentation
* move urls from descriptions to homepage field.
* [toolsrc] Optionally allow vcpkg to clean packages, buildtrees and downloads after each build
Adds switch --clean-after-build
* [toolsrc] Clarify that --clean-after-build deletes downloads
* [toolsrc] Revert changes to ci download caching behaviour
* some libraries export <PackageName>LibraryDepends.cmake
instead of <PackageName>Targets.cmake.
Those file also need the fix of #1044
should close#4753
* prefered the general solution #4622.
hopefully solved the issue within #4150
replaced the regex with something more readable
(also ident is lost)
should close:
#4753#4633#4150
and maybe more
* Hash vcpkg_fixup_cmake_targets.cmake
* [boost] Fix use of find_package(Boost) with cache variables
[socket-io-client] Fix install
* reversed change back to use regex replace
* [glbinding] Fix _IMPORT_PREFIX depth in *-export.cmake files
* [tinyspline] Ignore warnings treated as errors
* [libevent, liblemon, libpng, smpeg2, zlib] Fix apply patches
* [libsodium] Fix apply patches
* [folly] Link correct libraries in debug and release
* [vtk] Remove unset of _IMPORT_PREFIX
* [tinyspline] Do not treat warnings as errors
* [smpeg2] Fix double* to int comparison
* [nvtt] Define value for HAVE_UNISTD_H in MacOS
* [libui] Fix MacOS X build
* [zlib] Fix download URL
* [qhull] Update to v7.2.1
* [podofo] Set value for HAVE_UNISTD_H in MacOS
* [mongo-cxx-driver,ogre,podofo,qhull] Bump CONTROL version
* [mongo-c-driver] Set _IMPORT_PREFIX
* [tmxparser] Bump CONTROL version
* [qhull,vxl] Bump CONTROL version
* use dashed link for optional dependency
* output full dependency tree
* add warning if requested package does not exist
* [vcpkg] Formatting
* [vcpkg] Fix issue when parsing qualified dependencies
Before this change, "harfbuzz[glib] (!x86)" would parse as "harfbuzz[glib]||!x86" instead of the desired "harfbuzz|glib|!x86"
* [vcpkg] Improve depend-info handling of features and qualified dependencies.
* Add detection for VCPKG_DOWNLOADS environment variable in vcpkgpaths.cpp.
* Pass the downloads directory from VcpkgPaths to cmake.
* Also fixup bootstrap on *nix.
* Make error message a little prettier.
* Make that bash script actually work :)
* [vcpkg] Alter Optional<> usage style
* [vcpkg-docs] Add section on Environment Variables to the docs