Commit Graph

115 Commits

Author SHA1 Message Date
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
Daniel Shaw 264cd050e6 ExpectedT factory class 2017-06-06 14:02:59 -07:00
Alexander Karatarakis a66b066d45 get_environmental_variable() -> get_environment_variable() 2017-05-04 14:58:18 -07:00
Alexander Karatarakis a94efe662b Rename Strings:: function for utf8/utf16 conversion 2017-05-04 14:54:23 -07:00
Robert Schumacher cbc52bc6a4 [vcpkg] Remove OptBool in favor of Optional<bool> 2017-04-30 03:36:55 -07:00
Alexander Karatarakis 4ad755bb69 Run clang-foramt over tests and remaining cpp files 2017-04-27 18:59:57 -07:00
Alexander Karatarakis 1aef09ba58 Rework OptBool enum 2017-04-25 17:56:18 -07:00