Commit Graph

121 Commits

Author SHA1 Message Date
Robert Schumacher 8de3f323dc
[vcpkg] Resolve relative overlay ports to the current working directory. (#11233)
Fixes #10771.
2020-05-08 12:41:44 -07:00
nicole mazzuca 556325a1f7
[vcpkg] Add x-set-installed command (#10817)
This command takes a list of ports, and causes the final state of the
installed directory to be as-if one ran the install on an empty
installed directory (removing any unnecessary packages).

This is especially useful with the new `--x-install-root` option, which
allows one to set the `installed` directory for vcpkg to use.

Additionally, as a drive-by, we do some `stdfs` clean-up and add a
`.is_feature()` member function to BinaryParagraph (as opposed to
checking for `.feature().empty()`, which is far less clear to read).

This feature is experimental.
2020-04-17 15:49:59 -07:00
Robert Schumacher 60cd1202d9 [vcpkg] Introduce Job Objects to improve ctrl-c performance on Windows 2020-03-10 10:27:36 -07:00
Cristian Adam 38b959022c Add support for building with MinGW (#9137)
* 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-17 15:36:08 -08:00
Victor Romero f56645c3fd
Community Triplets 🤝 (#7976)
* 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
2020-01-17 14:21:19 -08:00
dan-shaw 552296a741 [vcpkg] update telemetry 2019-11-14 13:12:36 -08: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
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
Dan Nissenbaum ef48500ac6 Better error message when VCPKG_ROOT is independently defined (#7229) 2019-07-18 13:53:24 -07:00
martin-s 91da4aab4c Allow redirection of the scripts folder. (#6552)
* 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
2019-07-01 22:51:07 -07:00
Victor Romero 35e985d3cc
Triplets Overlay Implementation (#7053)
* Triplets Overlay Implementation

* Use cache for get_triplet_file_path()

* Code cleanup
2019-06-27 12:20:12 -07:00
İsmail Dönmez 8c49e565c0 Protect #pragma comment(lib, "foo") with _WIN32 checks (#6867)
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.
2019-06-12 16:30:03 -07:00
Robert Schumacher 8045248372
[vcpkg] Apply clang format (#6826) 2019-06-08 18:31:58 -07:00
Robert Schumacher 77af264118
[vcpkg] Fix regression in `--debug`. Remove old `features` featureflag. (#6507) 2019-05-18 18:15:31 -07:00
Curtis J Bezault 70f50a2d34 Add exit code (#6175)
* Add exit_fail to vcpkg.cpp

* Adding a comment as per @rastaban
2019-04-23 13:04:04 -07:00
Robert Schumacher b39b0899cb [vcpkg] Synchronize vcpkg-base with external repo (#5934) 2019-04-08 23:26:18 -07:00
Robert Schumacher 52f165ef3b [vcpkg] Respect the documented VS environment variable %VCPKG_VISUAL_STUDIO_PATH% 2019-02-05 14:46:17 -08:00
Robert Schumacher 828cedb755 [vcpkg] Add support for muslc, static crt linkage, and forcing the system binaries for cmake and ninja 2018-12-12 09:19:37 -08:00
Alexander Karatarakis f19df646a0 Survey times. Refactor Chrono stuff. All times UTC, unless explicitly mentioned
Survey is set to be every 6 months, but you also get one in the first 10 days.
2018-10-17 19:43:15 -07:00
Alexander Karatarakis cf199dba42 Survey prompts are now shown only for intall/remove/export/update 2018-10-17 19:43:14 -07:00
Robert Schumacher 56e1d2f696 [vcpkg] Wrap all external process spawning in a Ctrl-C catcher to avoid corrupted consoles 2018-10-16 00:35:47 -07:00
Robert Schumacher 802f51a142 [vcpkg] Split vcpkg::Commands::Fetch into backend and frontend 2018-07-09 06:29:37 -07:00
Robert Schumacher 8f0ebdf8d5 [vcpkg] Remove utf16 usage from non-Windows 2018-05-03 15:03:35 -07:00
Robert Schumacher a2aeb2f194 [vcpkg] Mark many types noexcept. Make certain code patterns more transparent to /analyze. #ifdef-out unused code on non-windows. 2018-04-12 00:47:17 -07:00
Robert Schumacher 3c7997215b [vcpkg] Improve default triplets for non-windows 2018-03-13 11:06:22 -07:00
Robert Schumacher 6670b87c18 [vcpkg] Add VCPKG_DEFAULT_VS_PATH environment variable 2018-03-10 14:19:51 -08:00
Robert Schumacher 25b8f25dad [vcpkg] Initial commit of experimental compressed binary archiving behind a flag 2018-02-26 18:38:25 -08:00
Robert Schumacher a2e6ffd86d [vcpkg] Refactor VcpkgCmdArguments to not utilize global state 2018-02-26 18:22:17 -08:00
Robert Schumacher 0ef0300b8e [vcpkg] Enable metrics on linux 2018-02-21 23:01:54 -08:00
Alexander Karatarakis 80f1563c6b Use empty() instead of comparing with size() 2018-01-23 15:21:33 -08:00
Alexander Karatarakis 209452755b Fix #include casing 2018-01-23 15:18:31 -08:00
Robert Schumacher 332414111d Revert "clang-tidy fixes"
This reverts commit 2d0a76370e.
2017-12-23 07:29:12 -08:00
Alexander Karatarakis 2d0a76370e clang-tidy fixes 2017-12-22 16:52:11 -08:00
Robert Schumacher 71f8958a06 [vcpkg-contact-survey] Add monthly survey prompt 2017-12-01 16:08:09 -08:00
Robert Schumacher d38d4a7540 [vcpkg] Add --x-xunit internal command to print installation results in a VSTS friendly format. 2017-11-30 08:09:09 -08:00
Robert Schumacher 415789b42e [vcpkg-metrics] Replace SQM with MAC hash. 2017-11-13 21:49:11 -08:00
sdcb 3457d89d41 Using CP_UTF8 macro instead of magic numbers. 2017-10-30 23:55:55 -07:00
Alexander Karatarakis 7ed8d4f75e Don't warn for outdated vcpkg if command is autocomplete 2017-10-16 17:24:17 -07:00
Robert Schumacher 7214c3583b [vcpkg] Push use of UTF-16 to only around Win32 call boundaries. 2017-10-16 11:44:04 -07:00
Alexander Karatarakis bf41a93b9d [vcpkg] Prefer the current vcpkg directory over the one the vcpkg.exe is located in 2017-10-14 02:07:42 -07:00
Robert Schumacher e17de99599 [vcpkg] Re-layout all files using new organization scheme.
All filenames and directories are lowercase. Use dots for namespace separation.
2017-10-13 18:37:41 -07:00
Alexander Karatarakis e25a31eca8 Suppress 4768 warning from shlobj.h 2017-10-02 17:29:11 -07:00
Alexander Karatarakis be27ae05f0 Version check is now performed before running any command
(except vcpkg version/hash/contact)
2017-09-14 04:13:03 -07:00
Alexander Karatarakis 2d1bee6bb5 [vcpkg.cpp] Naming scheme 2017-09-13 21:48:38 -07:00
Alexander Karatarakis da299cb49c Add missing const keywords 2017-08-28 16:59:59 -07:00
Robert Schumacher 67b9475ef2 [vcpkg] Set codepage to 65001, duplicate of #1682, fixes #1660 #1631 #1644 2017-08-25 17:30:56 -07:00
Mikhail Paulyshka af01792297 [vcpkg] use UTF-8 for console input/output 2017-08-25 17:27:11 -07:00
Robert Schumacher 98ee8a949a [vcpkg] Trap Ctrl-C, enable thread safety for global data structures 2017-08-25 16:03:57 -07:00
Alexander Karatarakis 88d96a3699 Run cleanup before exiting instead of calling atexit 2017-08-24 16:29:41 -07:00
Alexander Karatarakis e237682cad Introduce GlobalState struct 2017-08-24 16:29:40 -07:00