* [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
* [vcpkg] Consolidate several internal parsers together (packagespecs + logicexpression + control) and enhance error messages
* [vcpkg] Migrate Build-Depends parsing to new framework
* [vcpkg] Fix tests. Re-enable underscores in feature names due to libwebp[vwebp_sdl] -- todo: rename this feature and remove underscores.
* fix missing " around path
* Update VERSION.txt
* [vcpkg] Add quotes to include() in generated dep info file
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* remove unfinished "supports" tag
* extract "supports" from control files
But do nothing with the value
* Start `Supports` documentation
* Use Supports in a bunch of control files
I only tried matching the already existing logic in the portfile.cmake.
* Cmake var provider (#8)
* Cmake var provider (#9)
* fix windows build (#10)
* Add missing files to build
* Fix test (#11)
* adding hooks for cmake variables in expressions
* Adding hooks for 'supports' in CI test
* Fix test (#12)
* Add overrides to evaluation environment
* use "supported" tag in CI testing
* cleanup comment
* Fix issues with PR
* [var_provider] Get library linkage variables from triplet
* Fix compilation errors in tests
* Add unimplemented functions
* Fix unit tests part 1
* Fix issue when buildtrees dir does not exist
* Change binary output hash
* Fix handling of * feature
* Add core feature when using *
* Do not add Default-Features when installing 'core'
* [vcpkg] WIP. 6 failing tests.
* [vcpkg] WIP. 1 failing tests.
* [vcpkg] WIP. 0 failing tests.
* [vcpkg] Removed 'remove_graph'. 0 failing tests.
* [vcpkg] Removed 'install_graph'. 0 failing tests.
* [vcpkg] Remove AnyAction; replace with ActionPlan
* [vcpkg] Minor cleanup.
* [vcpkg][z3][qt5-connectivity][qt5-purchasing] Improve error messages while parsing. Fix a few trivial port issues.
* [vcpkg] Work around ICE with MSVC v140
* [vcpkg] Add purge on fail to decompress for CI
* [vcpkg] Fix parsing of nested parentheses in qualifiers
* [vcpkg] Fix Linux builds (explicit qualification in declaration)
* [vcpkg] Fix Build-Depends implying default features. Fix qualified dependencies regression.
* [mmx] Add to skip list and full rebuild -- mmx causes problems by installing 'sched.h'
* [libpqxx][mqtt-cpp] Prevent installing include/CMakeLists.txt
* [cppitertools] Fix installed include namespace (should be include/cppitertools)
* [libsoundio] Move headers into soundio/ subdirectory as per original cmake
* [ci.baseline] Temporarily skip charls due to conflict with dcmtk
* [vcpkg] Add restricted include files post build check -- bump global abi version
* [libsoundio] Hotfix stray line in portfile
* [vcpkg] Fix regression: CMake information was not being displayed for build-and-install actions
* [jsonnet] Fix installation of internal headers; use system nlohmann-json
* [grpc][upb] Teach grpc to use packaged upb. Add find_package(upb). Remove inappropriate upb features.
* [zfp] Move problematic 'include/bitstream.h' to 'include/zfp/bitstream.h'
* [x265] Bump control version to trigger rebuild after zfp conflict
* [akali] Disable parallel configure
* [dirent][dlfcn-win32][getopt-win32][pthreads] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS
* [ci.baseline] Update baseline for improved upb support
* [tgui] Disable parallel configure
* [libiconv] Enable VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS
* [aws-sdk-cpp] Disable parallel configure
* [vcpkg] Implement policy VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS
* [aws-sdk-cpp] Fix amount of escaping semicolons -- Note: I do not know the root cause requiring this change
* [libodb-sqlite] Fix configuring into source directory
* [gettext] Grandfather into VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS
* [libodb] DISABLE_PARALLEL_CONFIGURE
* [vcpkg] Add 'config.h' and 'local.h' to restricted header list
* [mcpp] Remove unused and problematic include 'config.h' from installed files
* [teemo] Move installed headers into subdirectory to prevent conflicts with x265
* [ci.baseline] Update current OSX. Skip libmesh on all platforms due to heavy conflicts.
* [vcpkg] Add 'slice.h' as a restricted header
* [osg] Improve accuracy of dependencies (disable some, add some to Depends)
* [vcpkg] Skip invoking a subprocess for 0 specs in load_tag_vars
* [ci.baseline] Skip mongo-c-driver on osx due to flakiness
* [teemo] Fix incorrect include file read
* [osg] Fix dependency typo: glut -> freeglut
* [vcpkg] Recover some lost performance with the addition of vcpkg_get_tags.
A huge performance cost was loading the triplet files over and over; instead, we splice the sources into a macro and load it once, then just call that macro for each port.
Remove use of hashing because we aren't cross-process-safe anyway (global static will do instead).
* [vcpkg] Change Supports atom 'windows' to include UWP. Improve Supports field documentation.
* [vcpkg] Add docs for VCPKG_ENV_PASSTHROUGH and VCPKG_DEP_INFO_OVERRIDE_VARS
* Fix typo
Co-authored-by: Curtis J Bezault <curtbezault@gmail.com>
Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* 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
* 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
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
```
* fixes to get vcpkg up and running when behind corporate proxy
* clean up of code to check if HTTP_PROXY environment variable is set
* fixed compiler errors for non win32 systems
* [vcpkg] Simplify HTTPS_PROXY code for WinHTTP
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
* - 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
remove_if is already stable, so separate stable and unstable versions are unnecessary.
https://iterator.wordpress.com/2016/01/31/algorithms_0/
Unstable remove_if algorithms are possible that might win, as indicated in that article; but plain remove_if provides the most consistent behavior.
* [Vulkan] Add a vulkan port based on the cuda port
* Add VULKAN_SDK env variable to whitelist
* * Added some additional diagnostic information
* Corrected if NOT exists statement
I'm seeing the error below:
Building package zlib[core]:x86-windows...
A suitable version of git was not found (required v2.17.1). Downloading portable git v2.17.1...
Downloading git...
WinHttpSendRequest() failed: 12002
I suspect the WinHttpSendRequest error is due to being behind a proxy -
most download issues seem to be this. Or perhaps because a sys admin
somewhere has disabled WinInet, somehow. I don't know. I don't know
how to debug WinHttpSendRequest(); a quick google search didn't help.
By printing the URL that vcpkg is trying to download, and where it's
trying to download to, I can pop the URL in my browser, save it at the
location specified, and move on with my life.
Response files are a convenient way of specifying bulk parameters,
typically supported by compilers and linkers. For vcpkg response files
provide a convenient way of installing sets of packages from simple
newline separate list files.
platforms in help
Currently vcpkg displays environment variable names in the help as
%VARIABLENAME% on non-Windows platforms, where it should be
$VARIABLENAME. This patch adds a macro to fix this.