Commit Graph

1975 Commits

Author SHA1 Message Date
Francois Rivard
741c8cbecd
[vcpkg] Add compiler info to nuspec description (#13571)
* Add compiler info to nuspec description

* Run clang-format on some files

* Fix the unit tests

* [vcpkg] Clarify NuGet description to note 'CXX compiler'

* [vcpkg] Fix tests

Co-authored-by: frivard <frivard@coveo.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-27 18:18:27 -07:00
ras0219
ae82a554f8
[vcpkg] Skip all files named .DS_Store, no need to check if the file is regular (#13669) 2020-09-27 17:30:59 -07:00
Pratik Chowdhury
3031f78ddd
[vcpkg] Show Empty Object on vcpkg --list when used with --x-json (#13667)
Thanks to @strega-nil for recommending using Json::stringify over my initial idea of simply printing an empty object

Closes #13637
2020-09-24 11:39:24 -07:00
Billy O'Neal
5d33bd3d79
[vcpkg] Fix the case of current_path() before use on Windows. (#13537)
* Fix the case of current_path() before use on Windows.

This is a better solution than that I tried in https://github.com/microsoft/vcpkg/pull/13144 -- rather than trying to cannoicalize the path completely, which would destroy symlinks etc; this form  calls FindFirstFile on each path element to get the real case from the filesystem.

Fixes #13105.

(Note the wrong case in the CWD in the prompt, but the correct case in all the output:)

PS C:\DeV\vcPKG> .\vcpkg.exe install curl
Computing installation plan...
The following packages will be built and installed:
    curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows
  * zlib[core]:x86-windows
Additional packages (*) will be modified to complete this operation.
Detecting compiler hash for triplet x86-windows...
Starting package 1/2: zlib:x86-windows
Building package zlib[core]:x86-windows...
Using cached binary package: C:\Users\billy\AppData\Local\vcpkg/archives\c6\c61dd1bcc23348934c55f4ced77f1e4b0f353394.zipBuilding package zlib[core]:x86-windows... done
Installing package zlib[core]:x86-windows...
Installing package zlib[core]:x86-windows... done
Elapsed time for package zlib:x86-windows: 62.26 ms
Starting package 2/2: curl:x86-windows
Building package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows...
Could not locate cached archive: C:\Users\billy\AppData\Local\vcpkg/archives\9f\9fa16d473c9539e9ea7ab3922eff46618f3a4c4b.zip
-- Downloading 9d954e49bc.tar.gz...
-- Extracting source C:/Dev/vcpkg/downloads/curl-curl-9d954e49bce3706a9a2efb119ecd05767f0f2a9e.tar.gz
-- Applying patch 0002_fix_uwp.patch
-- Applying patch 0004_nghttp2_staticlib.patch
-- Applying patch 0005_remove_imp_suffix.patch
-- Applying patch 0006_fix_tool_depends.patch
-- Applying patch 0007_disable_tool_export_curl_target.patch
-- Applying patch 0009_fix_openssl_config.patch
-- Applying patch 0010_fix_othertests_cmake.patch
-- Applying patch 0011_fix_static_build.patch
-- Using source at C:/Dev/vcpkg/buildtrees/curl/src/767f0f2a9e-91d24adee1.clean
-- Configuring x86-windows
-- Building x86-windows-dbg
-- Building x86-windows-rel
-- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/curl-config
-- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/vcpkg-cmake-wrapper.cmake
-- Installing: C:/Dev/vcpkg/packages/curl_x86-windows/share/curl/copyright
-- Performing post-build validation
-- Performing post-build validation done
Stored binary cache: C:\Users\billy\AppData\Local\vcpkg/archives\9f\9fa16d473c9539e9ea7ab3922eff46618f3a4c4b.zip
Building package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... done
Installing package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows...
Installing package curl[core,non-http,schannel,ssl,sspi,winssl]:x86-windows... done
Elapsed time for package curl:x86-windows: 1.299 min

Total elapsed time: 1.33 min

The package curl:x86-windows provides CMake targets:

    find_package(CURL CONFIG REQUIRED)
    target_link_libraries(main PRIVATE CURL::libcurl)

PS C:\DeV\vcPKG>

* Fix *nix builds.

* PR feedback.

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-09-22 20:16:24 -07:00
Billy O'Neal
0890b5a25f
[vcpkg] Add build scripts to produce signed vcpkg binaries. (#13508) 2020-09-21 17:27:35 -07:00
here-mikelley
35d7e4f0b3
[vcpkg] Keep sym links in Linux zip cache files (#13609)
* [vcpkg] Add '-y' to binary caching zip command on non-Windows platforms
2020-09-18 17:02:09 -07:00
ras0219
54a09ff4ef
[vcpkg-docs] Add docs/users/binarycaching.md (#13517)
* [vcpkg-docs] Add docs/users/binarycaching.md

* [vcpkg] Address PR Comments

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-15 18:04:12 -07:00
ras0219
11de106d37
[vcpkg] Add metrics for binarycaching feature (#13486)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-14 15:49:51 -07:00
nicole mazzuca
0fec1340eb
[vcpkg manifest] Add documentation! (#13488)
* [vcpkg docs] add docs for manifest files

These are just for the maintainer docs,
not user docs.

* [vcpkg] EBNF-ify platform expression parsing

this modifies nothing about what strings are accepted or rejected,
it just moves stuff around.

also adds tests.

* [vcpkg docs] add manifest mode example

* [wip] docs for augustin

also fix tabs

* [vcpkg manifest] switch to using maps for features

* Apply suggestions from code review

* un-experimentize format-manifest

* flesh out the user manifest mode docs

* CRs

* billy CRs

* final personal pass-thru
2020-09-14 15:07:02 -07:00
Billy O'Neal
180cae5b6d
Fix boostrap on VS2019. (#13489) 2020-09-11 14:27:41 -07:00
Billy O'Neal
6b97dbfce2
[vcpkg] Merge the vcpkg metadata uploader into the vcpkg binary (#13421) 2020-09-11 13:52:18 -07:00
martin-s
e8790f0f1a
[vcpkg] Fix issue #12745. (#12746) 2020-09-11 13:17:47 -07:00
Andrei Lebedev
645f316824
[vcpkg] improve s390x support (#13386)
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
2020-09-09 12:28:38 -07:00
ras0219
a35ddddac8
[vcpkg] Fix compilation on VS2015 (#13398)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-07 16:48:46 -07:00
ras0219
0d0a84694c
[vcpkg] Improve Json error messages (#12981)
* [vcpkg] Fix error reporting on json parse failure

* [vcpkg] Track manifest path for use in diagnostics

* [vcpkg] Use by-value for consumer API. Improve trailing comma diagnostic.

* [vcpkg] Track errors directly inside Json::Reader

* [vcpkg] Fixup use of .u8string()

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-09-07 15:50:20 -07:00
Vitaliy Didik
bfed76d917
[vcpkg] Fixed 'update' command output (#13378) 2020-09-06 11:54:00 -07:00
xyb
fdac1fc5aa
Add community triple arm64-linux and arm-linux. (#11880)
Verify the following command on both 32 bits and 64 bits OS on Raspberry pi 3.

    ./bootstrap-vcpkg.sh
    ./vcpkg install boost
2020-09-05 10:45:48 -07:00
dan-shaw
bd8af07898
[vcpkg] json format for search (#12509) 2020-09-05 07:35:40 -07:00
nicole mazzuca
4467eb334a
fix compile on g++ 6 (#13290) 2020-09-04 11:49:56 -07:00
ras0219
13f5a3d615
[vcpkg] Delay failures in vcpkg install until missing manifest requested (#13231) 2020-09-03 11:53:26 -07:00
nicole mazzuca
9740611cab
[vcpkg] Registries MVP (#13038) 2020-09-02 09:13:44 -07:00
ras0219
a0536798ee
[vcpkg] Implement 'repository' tag for NuGet binary caching (#13228)
This tag is required to correctly interface with GitHub Packages, because GHP shares a single remote for the entire organization and uses the repository field to associate a package with a particular repository.

This tag will be automatically generated if the default GitHub Actions environment variables are present (GITHUB_XYZ) or if the user defines VCPKG_NUGET_REPOSITORY.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-08-31 22:37:10 -07:00
nicole mazzuca
dea7d758c6
[vcpkg] Fix upgrade for port-version (#13069)
Co-authored-by: Billy Robert O'Neal <bion@microsoft.com>
2020-08-25 15:08:25 -07:00
Billy O'Neal
64cbded18e
[vcpkg] Fix #13094 by avoiding the comma operator. (#13117)
* Fix #13094 by avoiding the comma operator.

Drive-by remove unused parenthesis and remove macro inversion in metrics.cpp.
2020-08-25 14:49:27 -07:00
huahang
99b07566f4
[vcpkg] Fix build on old compilers. (#12950) 2020-08-24 18:14:38 -07:00
ras0219
5d331ed553
[vcpkg] Fix editable bug (#12910) 2020-08-22 01:27:40 -07:00
Phoebe
f6948aeb68
[vcpkg] fix hint message (#13043) 2020-08-20 22:44:42 -07:00
nicole mazzuca
dfa7dc4276
remove registries.h and fwd/registries.h... (#13017) 2020-08-19 21:12:55 -07:00
Phoebe
680b2928a1
[vcpkg] Update hint message (#12976) 2020-08-19 17:34:43 -07:00
nicole mazzuca
5e164e3dd2
[vcpkg] Add Forward Declarations (originally by @cngzhnp) (#12985)
Co-authored-by: cngzhnp <cengizhanpasaoglu@gmail.com>
2020-08-19 15:33:15 -07:00
Jack·Boos·Yu
0bb8780a60
[vcpkg] Use std::filesystem when Visual Studio is greater than 2015 (#12774)
Co-authored-by: Nicole Mazzuca <mazzucan@outlook.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-08-18 09:23:01 -07:00
Ignacio Rodríguez
5dd2b6736b
[vcpkg] Remove unused function (#12837)
updating use of Span<>

after clang-format

two changes undone
2020-08-17 08:31:45 -07:00
ras0219
74ab3aae01
[vcpkg] Restore layering and purge unused ParagraphParseResult (#12897)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-08-14 11:05:18 -07:00
ras0219
0c2117845e
[vcpkg] Reduce dependencies and contents of vcpkgpaths.h (#12876)
* [vcpkg] Remove globally-constructed pre-defined Triplets from vcpkg.exe

The tool should be as triplet-agnostic as possible, which leaves little room for special, pre-defined names like this. However, tests do have use of them: moved into test assets.

* [vcpkg] Move predefined tools strings vcpkgpaths.h -> tools.h

* [vcpkg] Add forward declarations to vcpkgpaths.h to reduce header deps

* Merge from origin/master

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-08-14 09:53:04 -07:00
ras0219
0b5bbe30d9
[vcpkg] Lift --x-json to a global option, implement experimental x-package-info command (#12845)
* [vcpkg] Improve error reporting in vcpkg::Json

* [vcpkg] Lift --x-json to a common option

* [vcpkg] Address warnings-as-errors in VS2015

* [vcpkg] Remove unused local

* [vcpkg] Extract vcpkg::Install::get_cmake_usage

* [vcpkg] Implement vcpkg::serialize_ipv(ipv, paths)

* [vcpkg] Implement x-package-info to enable tooling

* [vcpkg] Fixup tests to respect new cli mode

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-08-13 18:36:33 -07:00
ras0219
c771e7bd07
[vcpkg] Fix resolution of default features when using Manifest mode (#12829)
* [vcpkg] Fix resolution of default features when using Manifest mode

During manifest mode, the dependencies in the manifest should be treated as explicitly specified -- curl[core] should not install curl's default features.

* [vcpkg] Improve error message when failed to parse manifest file

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-08-12 12:35:26 -07:00
nicole mazzuca
895678db8f
[vcpkg] Rewrite CMake build system to be more target-based (#12698)
* Change to using more target-focused cmake

* Add vcpkg_target_add_warning_options

* targetify the rest

* move the globs together

* Force-include pch.h on non-windows

* Rename VCPKGLIB_NON_PCH_* to VCPKGLIB_* in globs

* Remove `include "pch.h"`s

* missed a few lines

* fix build

* fix CMAKE_CURRENT_SOURCE_DIR

* try to fix VCPKG_REQUIRE_LINK_CXXFS

* change msvc-stl logic

* fix build

* CR

* clang-format

* Apply suggestions from code review

Thanks @ras0219!

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-08-10 12:32:34 -07:00
ras0219
481738beae
[vcpkg] Add vcpkg export to E2E tests. Enable E2E tests on all platforms. (#12198)
* [vcpkg] Add `vcpkg export` to E2E tests. Enable E2E tests on MacOS.

* [vcpkg] Fix export --raw --output-dir=/path/ by changing directory to new export root

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-08-10 10:22:51 -07:00
nicole mazzuca
40c8aab459
[vcpkg] Fix vs2015 build (#12789)
* move windows bootstrap directory

* fix paths

* actually fix the build

* fix path
2020-08-06 17:04:47 -07:00
Arves100
e79a4f3630
[vcpkg] Add missing check for x86 (#12678) 2020-08-05 14:00:21 -07:00
Alexander Neumann
4fb846bd44
[vcpkg] add environment variable VCPKG_OVERLAY_PORTS (#12640)
* [vcpkg] add environment variable VCPKG_OVERLAY_PORTS

* add documentation for VCPKG_OVERLAY_PORTS

* append env overlay instead of prepending to give explicitly listed overlays priority

* fix formating (manually)

* manually fixing formating

* improve help text

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>

Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-08-05 11:21:42 -07:00
nicole mazzuca
1c2af99415
[vcpkg format-manifest] Add convert-control flag (#12471)
* [vcpkg format-manifest] initial convert-control attempt

TODO: manifest comments! we should keep $directives

* Finalize x-format-manifest

First, fix Json::parse -- "\c", for any c, was incorrectly parsed.
It would emit the escaped character, and then parse the character, so
that `\b` would give you { '\b', 'b' }.

Second, canonicalize source paragraphs as we're parsing them. This found
an error in qt5 -- The `declarative` feature was listed twice, and we
now catch it, so I removed the second paragraph.

Add PlatformExpression::complexity to allow ordering platform
expressions in a somewhat reasonable way.

Notes:
  - We allow `all_modules` as a feature name for back-compat with
    paraview
  - In order to actually convert CONTROL to vcpkg.json, we'd need to
    rename the qt5 `default` feature.
  - We need to add support for $directives in x-format-manifest

* fix qt5 port

* format

* fix compile

* fix tests for canonicalization

* Clean up code

* add error message for nothing to format

* add extra_info field

* add `const X&` overloads for `Object::insert[_or_replace]`

* fix compile

* simple CRs

* add tests

* format

* Fix mosquitto port file

also unmerge a line

* fail the tests on malformed manifest

* fix format_all

* fix coroutine port-version

* format manifests
2020-08-02 10:08:07 -07:00
nicole mazzuca
d6565e146c
[vcpkg manifest] add feature support (#12549) 2020-08-01 16:45:00 -07:00
Alexander Neumann
4ab218039c
[vcpkg] Add environment variable VCPKG_DEFAULT_BINARY_CACHE (#12423)
* [vcpkg] Add environment variable VCPKG_BINARY_CACHE

* apply clang-format

* change line ending

* Update toolsrc/src/vcpkg/binarycaching.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* Remove comment

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* rename to VCPKG_DEFAULT_BINARY_CACHE

* apply clang format

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-08-01 13:59:33 -07:00
nicole mazzuca
f225ba822b
[vcpkg manifest] look at platform directives (#12548)
Fixes #12538
2020-08-01 13:46:26 -07:00
nicole mazzuca
54ec974afe
[vcpkg] Refactor commands 2: Electric Boogaloo (#12641)
* Add BasicCommand and VersionCommand

* Add ContactCommand

* test get_available_commands_type_c

* Change get_available_commands_type_c to return objects

* Add TripletCommand & InstallCommand

* Add SetInstalledCommand

* add linking tests

* Add CICommand

* Add remaining *Command objects

* Add tests for commands_type_a

* Move over to using const TripletCommand* for commands_type_a

* Add PathsCommand

* Add SearchCommand

* add test for commands_type_b

* add *Command for all type b commands

* Switch from function pointers to PathsCommand for everything

* format

* rename get_available_commands

also remove CommandType* types
2020-08-01 13:45:17 -07:00
nicole mazzuca
56fffbe49d
[vcpkg] Refactor Commands: Part 1 (#12585)
* Rename commands.exportifw.cpp -> export.ifw.cpp

* move DryRun from commands.h -> commands.interface.h

* move vcpkgcmdarguments and vcpkgpaths over to commands.interface.h

* move vcpkg::Commands::BuildExternal -> commands.buildexternal.h

* add commands.*.h for the commands.*.cpp

* move vcpkg::Commands::* to commands.*.h

* move vcpkg::Commands::{Hash,Fetch} to their own files

* change include commands.h -> commands.*.h in commands.*.cpp

* remove commands.*.h from commands.h

* join vcpkg::Commands::* into one namespace line

* fix vcxproj build
2020-07-31 11:53:42 -07:00
nicole mazzuca
37f7d69757
[vcpkg] Fix build on Windows 8.1 SDK (#12586) 2020-07-31 11:53:18 -07:00
Andrei Lebedev
077c0746be
[vcpkg] Add initial s390x support (#12534)
Signed-off-by: Andrei Lebedev <lebdron@gmail.com>
2020-07-23 14:16:01 -07:00
Alexander Neumann
9220d6fcb7
[vcpkg] Add NVTOOLSEXT_PATH to the env passthrough list (#12468)
(CMake uses it to search for the toolkit)
2020-07-21 15:45:40 -07:00
ras0219
44a5a4f4f2
[libmicrohttpd] Add platform.h to restricted header list. (#12455)
Fixes #12450

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-20 18:02:45 -07:00
Cristian Adam
f4bd64233a
Build fix with MinGW GCC 9.2.0 (#12084)
* Build fix with MinGW GCC 9.2.0

* Fix MinGW tripplets

Fixes #12065

* clang-format

* Fix unused read_symlink_implementation warning marked as error

read_symlink_implementation was used only in copy_symlink_implementation
when #if defined(_WIN32) && !VCPKG_USE_STD_FILESYSTEM  was true.

Removed the warning otherwise.

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
2020-07-18 08:48:01 -07:00
dan-shaw
751fc627ef
[vcpkg] print list in json (#12179)
* print list command in json

* fix spacing

* remove reference

* review

* fixes based on review
2020-07-17 15:52:19 -07:00
nicole mazzuca
6bf5adff93
[vcpkg] Clean up command switch code (#12351)
* [vcpkg] Clean up command switch code

Make it more similar to the non-command switch code

* format

* fix the tests

* reformat

* format

* wip

* support x- for command options

* fix autocomplete

* format
2020-07-15 17:29:18 -07:00
Maksim Moisiuk
8254d3be9f
[vcpkg] implement copy_symlink working for non-elevated processes (#12400)
* [vcpkg] implement copy_symlink working for non-elevated processes

* [vcpkg] read_symlink Windows implementation

* [vcpkg] normalize_path on Windows only

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* remove normalization

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* Update toolsrc/src/vcpkg/base/files.cpp

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

* use unique_ptr

* comments

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-07-15 15:13:54 -07:00
Maks Naumov
075a18b594
[vcpkg] Fix ParagraphParser::required_field() (#12429) 2020-07-15 14:42:45 -07:00
nicole mazzuca
d2620cf02b
[vcpkg formatting] Turn off DeriveLineEnding (#12368)
* [vcpkg formatting] Turn off DeriveLineEnding

* format

* Add newlines to the end of files

Since we're reformatting anyways
2020-07-14 08:50:19 -07:00
alcroito
f1fbee87db
[vcpkg] Fix iOS toolchain detection when using the iOS community triplets (#12361)
* [vcpkg ios] Fix detection of iOS toolchain (#6003)

Added mapping of CMAKE_SYSTEM_NAME == iOS to the bundled iOS toolchain
file.

This fixes the "Unable to determine toolchain to use for
triplet arm64-ios with CMAKE_SYSTEM_NAME iOS" error.

* [vcpkg ios] Set the CMake system processor for the simulator arches (#6003)

So it's consistent for all architectures.
2020-07-13 14:13:44 -07:00
ras0219
385fb52332
[vcpkg] Track hashes of cmake script helpers in consuming portfiles (#12254)
* [vcpkg] Track hashes of cmake script helpers in consuming portfiles

* [vcpkg] Format

* [vcpkg_find_acquire_program] Use cpkg_from_sourceforge for FLEX and BISON

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-13 13:43:39 -07:00
Maksim Moisiuk
713950c89b
[vcpkg] proper errorcheck during files installation (#12378)
* [vcpkg] proper errorcheck during files installation

* [vcpkg] move ec.clear to status_implementation
2020-07-13 12:13:55 -07:00
ras0219
7b3eea9481
[vcpkg] Add CMake heuristics for header-only libraries (#12386)
* [vcpkg] Add CMake heuristics for header-only libraries

* [vcpkg] Update toolsrc/src/vcpkg/install.cpp

Handles the case of:
```
triplet/lib/
triplet/lib/x.pc
```

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-07-13 12:07:52 -07:00
ras0219
52a9d9a9e4
[vcpkg] Enable binary caching by default (#12370)
* [vcpkg] Enable binary caching by default. Support `x-` migration.

Fix passing multiple copies of single parameter arguments.

* [vcpkg] Handle x- prefixes for general arguments

* [vcpkg] Fix #12285 and improve documentation of default binary cache path

* [vcpkg] Revert x- prefix homogenization for per-command arguments

* [vcpkg] Only use accelerated compiler detection for Windows Desktop + Ninja. Improve breadcrumbs for users encountering issues.

* [vcpkg] Fix compiler tracking not pre-downloading Ninja. Fix compiler tracking not looking in -err.log.

* [vcpkg] Update toolsrc/src/vcpkg/binarycaching.cpp

Co-authored-by: Billy O'Neal <bion@microsoft.com>

* [vcpkg] Format

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
2020-07-13 12:03:53 -07:00
nicole mazzuca
0523b5eb57
[vcpkg formatting] Fix format regex (#12369)
* [vcpkg formatting] correct the header regexes

* format
2020-07-11 21:07:51 -07:00
nicole mazzuca
544f8e4593
[vcpkg build] fix #12355 (#12367) 2020-07-10 16:06:01 -07:00
nicole mazzuca
8a8d725b43
[vcpkg] Remove unnecessary work queue (#12350)
this work queue implementation was added at some point, and is no longer used anywhere.
Delete it as not used; if we need it again, we can grab it from the history
2020-07-09 16:04:59 -07:00
ras0219
a571c8ecc0
[vcpkg] Move default binary cache from $root/archives to user-wide directory (#12256)
* [vcpkg] Move default binary cache from `$root/archives` to user-wide directory

Teach nuget/nugetconfig binary sources to use read/write.

* [vcpkg] Reformat

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-09 15:14:05 -07:00
Alexander Neumann
513cac2f62
[cuda] correct env variables for newer cuda versions (#12244)
* [cuda] correct env variables for newer cuda versions

* Update ports/cuda/CONTROL

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
2020-07-09 14:20:45 -07:00
nicole mazzuca
3871d73349
[vcpkg manifests] fix some issues (#12227)
Fixes #12190
Fixes #12208
Fixes #12234
Fixes #12286
Fixes #12315
Fixes #12186
Fixes #12331
Fixes googleapis/google-cloud-cpp#4487
2020-07-09 12:32:31 -07:00
Jack·Boos·Yu
0c95d75d08
[vcpkg] Ignore dependencies not found errors when downloading mode (#12323) 2020-07-08 13:52:53 -07:00
ras0219
f9bdf13953
[vcpkg] Implement --editable (#12200)
--editable suppresses binary caching and source re-extraction for packages listed on the command line (similar to --head).

This fundamentally changes the port maintenance loop, so several example documents were updated. To avoid users having substantial changes suddenly destroyed by forgetting to pass --editable, "clean" sources have different extract locations.

The undocumented command `build` implies `--editable`.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-07 13:53:19 -07:00
nicole mazzuca
6a41626eaf
[vcpkg] Format the C++ in CI (#11655)
* [vcpkg] Format the C++ in the CI

* format the C++

* CR
2020-07-06 16:45:34 -07:00
Billy O'Neal
8eda81cc4d
[opengl wincrypt winsock2] Use $ENV{WindowsSdkDir} instead of hard coding Windows SDK paths. (#12232)
Also delete vcpkg_get_program_files_32_bit because it was used in only one place.

Resolves #8288
Obsoletes #11421, #11261, #8329
2020-07-06 12:42:35 -07:00
Wolfgang Stöggl
6958919b40
[vcpkg] Update toolsrc VERSION to 2020.06.15 (#12263)
The currently released version of vcpkg is 2020.06.15
See commit: https://github.com/microsoft/vcpkg/commit/6185aa7

- Update also:
  vcpkg/toolsrc/VERSION.txt
2020-07-06 12:12:16 -07:00
ras0219
b37b1bae58
[vcpkg] Revert change which causes sources to be purged by default in vcpkg build (#12272)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-06 11:53:25 -07:00
ras0219
e82e56f27f
[vcpkg] Remove use of std::variant and std::visit to fix VS2015. (#12242)
Fixes #12220

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-06 11:03:38 -07:00
Billy O'Neal
a28bfe7674
[vcpkg] Remove the tombstones and 'ignore' baseline concepts. (#12197)
This changes our PR builds to treat 'fail' in the ci.baseline.txt as 'skip' instead of using tombstones.

We currently have large numbers of spurious failures that get enshrined in PRs through no fault of a PR author, removing the tombstones concept will fix those by allowing the user to retry. This does mean we accept some risk of not detecting when a port is 'fixed', but that failure is reasonable for us to handle after we see it in CI, but that seems worth it given that it lets us get rid of the tombstone concept.

This also helps out the binary caching feature, because we don't have to figure out how to productize tombstones.
2020-07-02 20:20:07 -07:00
ras0219
a218d0e61d
[vcpkg] Remove all uses of Foo::Foo() noexcept = default; to fix #9955 (#12201)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-01 21:05:18 -07:00
ras0219
5a9d8011f5
[vcpkg] Enable NuGet-based binary caching via mono (#12170)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-01 12:18:37 -07:00
nicole mazzuca
7e8cda8404
Fix sourceparagraph:BooleanField (#12192)
the function is called `visit_boolean`, not `visit_bool`.
I wish there was a better way to do this.
2020-07-01 12:16:32 -07:00
ras0219
135f91de1e
[vcpkg] Implement --x-write-nuget-packages-config= setting for install and x-set-installed (#12138)
* [vcpkg] Implement --x-write-nuget-packages-config= setting for `install` and `x-set-installed`.

* [vcpkg] Add end-to-end testing suite for install, remove, and binary caching

* [vcpkg] Define `$TestingRoot in end-to-end-tests.ps1

* [vcpkg] Address CR comments

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-07-01 11:36:09 -07:00
ras0219
3f6342db6d
[vcpkg] Fix vcpkg export --nuget regressions (#12174)
* [vcpkg] Upgrade find_acquire_program(NUGET) to 5.5.1. Add partial SHA to temporary download paths to avoid collisions.

* [vcpkg] Fix regression in `vcpkg export --nuget` due to file locking on .vcpkg-root

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-30 14:02:26 -07:00
nicole mazzuca
1d8f0acc9c
[vcpkg manifest] Manifest Implementation (#11757)
==== Changes Related to manifests ====

* Add the `manifests` feature flag
  * This only says whether we look for a `vcpkg.json` in the cwd, not
    whether we support parsing manifests (for ports, for example)
* Changes to the manifests RFC
  * `"authors"` -> `"maintainers"`
  * `--x-classic-mode` -> `-manifests` \in `vcpkg_feature_flags`
  * reserve `"core"` in addition to `"default"`, since that's already
    reserved for features
  * Add a small helper note about what identifiers must look like
  * `<license-string>`: SPDX v3.8 -> v3.9
  * `"feature"."description"` is allowed to be an array of strings as well
  * `"version"` -> `"version-string"` for forward-compat with versions
    RFC
* Add the `--feature-flags` option
* Add the ability to turn off feature flags via passing
  `-<feature-flag>` to `VCPKG_FEATURE_FLAGS` or `--feature-flags`
* Add CMake toolchain support for manifests
  * Requires either:
    * a feature flag of `manifests` in either `Env{VCPKG_FEATURE_FLAGS}`
      or `VCPKG_FEATURE_FLAGS`
    * Passing the `VCPKG_ENABLE_MANIFESTS` option
  * The toolchain will install your packages to
    `${VCPKG_MANIFEST_DIR}/vcpkg_installed`.
* Add MSBuild `vcpkg integrate install` support for manifests
  * Requires `VcpkgEnableManifest` to be true
* `vcpkg create` creates a port that has a `vcpkg.json` instead of a
  `CONTROL`
* argparse, abseil, 3fd, and avisynthplus ports switched to manifest
  from CONTROL
* Add support for `--x-manifest-root`, as well as code for finding it if
  not passed
* Add support for parsing manifests!
* Add a filesystem lock!

==== Important Changes which are somewhat unrelated to manifests ====

* Rename `logicexpression.{h,cpp}` to `platform-expression.{h,cpp}`
* Add `PlatformExpression` type which takes the place of the old logic
  expression
  * Split the parsing of platform expressions from checking whether
    they're true or not
  * Eagerly parse PlatformExpressions as opposed to leaving them as
    strings
* Add checking for feature flag consistency
  * i.e., if `-binarycaching` is passed, you shouldn't be passing
    `--binarysource`
* Add the `Json::Reader` type which, with the help of user-defined
  visitors, converts JSON to your internal type
* VcpkgArgParser: place the switch names into a constant as opposed to
  using magic constants
  * In general update the parsing code so that this ^ works
* Add `Port-Version` fields to CONTROL files
  * This replaces the existing practice of
    `Version: <my-version>-<port-version>`

==== Smaller changes ====
* small drive-by cleanups to some CMake
  * `${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}` ->
    `${CURRENT_INSTALLED_DIR}`
  * Remove `-analyze` when compiling with clang-cl, since that's not a
    supported flag (vcpkg's build system)
  * Add a message about which compiler is detected by vcpkg's build
    system machinery
* Fix `Expected::then`
* Convert `""` to `{}` for `std::string` and `fs::path`, to avoid a
  `strlen` (additionally, `.empty()` instead of `== ""`, and `.clear()`)
* Add `Strings::strto` which converts strings to numeric types
* Support built-in arrays and `StringView` for `Strings::join`
* Add `operator<` and friends to `StringView`
* Add `substr` to `StringView`
* SourceParagraphParser gets some new errors
2020-06-30 10:40:18 -07:00
ras0219
d47570b8d6
[vcpkg-x-set-installed] Implement --dry-run (#12132)
* [vcpkg-x-set-installed] Implement --dry-run

* [vcpkg] Address code review comments

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-27 09:50:01 -07:00
Billy O'Neal
81ae2ed94b
[vcpkg] Add write-only binary caching for CI. (#12130)
Changes to the binary caching spec made as comments over at https://github.com/microsoft/vcpkg/pull/11204#pullrequestreview-438518901
2020-06-26 12:37:53 -07:00
Billy O'Neal
309f6fc9bc
[vcpkg] Delete unused --purge-tombstones and introduce BufferedPrint class (#12049)
* Introduce buffered_print class to manage buffered write patterns like in the ci command.

* Remove --purge-tombstones option.

* Law of demeter.

* Make buffered_print imobile.

* buffered_print => BufferedPrint

* Fix merge conflict.
2020-06-26 12:16:17 -07:00
ras0219
91e798afd8
[vcpkg] Implementation of --x-binarysource=nuget (and friends) (#12058)
* [vcpkg] Initial implementation of --x-binarysource=nuget

* [vcpkg] Remove double-double quoting of CMake arguments

* [vcpkg] Update nuget.exe to 5.5.1 to support Azure DevOps Artifacts

* [vcpkg] Enable batching of NuGet server calls with prefetch(). Add `interactive` binarysource.

* [vcpkg] Add `nugetconfig` binary source

* [vcpkg] Short circuit querying remote NuGet servers once all refs are found

* [vcpkg] Add experimental help for binary caching

* [vcpkg] Improved NuGet cache package descriptions and version formatting

* [vcpkg] Rename `CmdLineBuilder::build()` to extract()

* [vcpkg-help] Ascii-betize help topics

* [vcpkg] Add tests for cmdlinebuilder. Improve handling of quotes and slashes.

* [vcpkg] Addressing code review comments

* [vcpkg] Add tests for vcpkg::reformat_version()

* [vcpkg] Added test for vcpkg::generate_nuspec()

* [vcpkg] Add tests for vcpkg::XmlSerializer

* [vcpkg] Addressed code review comment

* [vcpkg] Add test for vcpkg::Strings::find_first_of

* [vcpkg] Fix machine-specific paths in test for vcpkg::generate_nuspec()

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-26 12:16:02 -07:00
ras0219
7ebb42a4d9
[vcpkg] Fix "[commands-build] build smoke test" (#12128)
* [vcpkg] Fix "[commands-build] build smoke test"

1. Do not exit with a success code in Build::perform, because this causes failures in other tests to be ignored.
2. Use temp directory to avoid interference with the current set of {installed, buildtrees, packages}
3. Explicitly disable binary caching

* [vcpkg] Disable binarycaching in "build smoke test", "[commands-build]"

Return 1 for the last failure case in Build::perform() so testing may continue.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-26 11:35:41 -07:00
ras0219
4c527e49c4
[vcpkg] Use XDG/LOCALAPPDATA for default binary caching path (#12091)
* [vcpkg] Use XDG Base Directory Specification on non-Windows

* [vcpkg] Move user-wide binary cache on Windows to $LOCALAPPDATA/vcpkg/archives

* [vcpkg] Address code review comments; refactor other uses of LOCALAPPDATA

* [vcpkg] Address code review comments

* [vcpkg] filesystem::path::append() accepts string arguments, not paths.

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-26 11:26:38 -07:00
nicole mazzuca
22c8e3a23a
[vcpkg build] fix build command (#12072) 2020-06-25 18:23:30 -07:00
Billy O'Neal
0d37525d75
[vcpkg] Commonize pipelines build powershell and don't use binary caching in CI (rather than PR) builds (#12082) 2020-06-25 16:36:28 -07:00
ras0219
aef838536e
[vcpkg] Track compiler information in ABI (#11654)
* [vcpkg] Refactor out abi_tags_from_pre_build_info()

* [vcpkg] Track Windows toolchain file in triplet hash

* [vcpkg] Improve error messages when constructing PreBuildInfo

* [vcpkg] Extract InstallPlanAction::BuildAbiInfo

* [vcpkg] Extract Build::EnvCache and private-impl VcpkgPaths

* [vcpkg] Enable compiler hash detection when binarycaching is enabled

* [vcpkg] Downgrade warning about missing ABI keys

When binarycaching is not enabled, this warning is spurious and provides no user value.

* [vcpkg] Cleanup

* [vcpkg] Refactor compiler tracking into triplet abi computation

Move several static global caches into VcpkgPaths/EnvCache.
Add feature flag 'compilertracking' to enable the new feature.

* [vcpkg] Refactor out PreBuildInfo::using_vcvars()

Move VcpkgTripletVar into build.cpp because it is not used outside that file.

* [vcpkg] Address some code analysis warnings

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-22 14:14:36 -07:00
Vitalii Koshura
de44a808e0
Put user-defined configuration triplets path on top of the search queue (#11931)
I believe that user-defined configuration triplets paths should be the first when searching for triplet configuration.
This commit puts user-defined configuration triplets (if defined) on top of the search queue before standard paths.
This could help to overwrite default tiplet configuration without setting custom triplet.

P.S. If current implementation is better than my suggestion, feel free to ignore this commit.

Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
2020-06-18 15:53:58 -07:00
ras0219
4cbbf4ebe6
[vcpkg] Fix issue #9781 by exporting from the installed directory (#11015)
* [vcpkg] Fix issue #9781 by exporting from the installed directory

* [vcpkg] Address code review comments for #11015

* [vcpkg] Remove duplicate triplet in installed path from exports

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-17 12:32:05 -07:00
Billy O'Neal
04e214eb0e
[vcpkg] Fix create by extracting common paths settings (#11842)
Resolves #11784
2020-06-16 11:58:11 -07:00
Billy O'Neal
7192d3affa
[vcpkg] Delete g_binary_caching global that should be passed as a parameter. (#11958) 2020-06-15 14:34:26 -07:00
Alexander Neumann
14514508d8
[vcpkg] Add vcpkg item to project settings in Visual Studio (#4361)
Co-authored-by: Curtis J Bezault <curtbezault@gmail.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-06-15 14:24:14 -07:00
Billy O'Neal
9efc1318dd
[vcpkg] Fix bootstrap on VS2015 (#11891)
* Fix boostrap on VS2015 by removing use of C++17 constexpr lambdas.
2020-06-11 17:47:18 -07:00
Billy O'Neal
1d3e985e4f
[vcpkg] Fix OSX CI by ensuring the downloads directory exists (#11839)
* [vcpkg] Remove do-nothing Set-Content from Windows azure-pipelines.yml.
* [vcpkg] Fix OSX CI by ensuring the downloads directory exists in advance, and extract common command line parameters with powershell splatting.
* [tensorflow-cc] Prevent hang building tensorflow-cc asking to configure iOS.
* Skip ignition-msgs5:x64-osx
2020-06-08 22:46:18 -07:00
Billy O'Neal
4fb2256085
[vcpkg] Allow CI to pass in all relevant directories and remove use of symbolic links (#11483) 2020-06-03 19:31:28 -07:00
Mohammed Alyousef
a6257ac262
[vcpkg] add x86-wasm.cmake to community triplets (#11323)
* add x86-wasm.cmake to community triplets

The EMSDK enviroment variable is normally defined when first installing Emscripten.

* Rename x86-wasm.cmake to wasm32-emscripten.cmake

* Update wasm32-emscripten.cmake

* Update wasm32-emscripten.cmake

* Add wasm32 and wasm64 arch to docs

* Create wasm64-emscripten.cmake

* remove wasm64

* Delete wasm64-emscripten.cmake

* Add wasm32 to list of identifiers

* add emscripten VCPKG_CMAKE_SYSTEM_NAME support

* add path check to EMSDK cmake toolchain
2020-06-02 16:07:41 -07:00
Billy O'Neal
cc4f93f434
[vcpkg] Rename the msbuild property VcpkgRoot to VcpkgCurrentInstalledDir, and set VcpkgRoot to the expected root instead. (#11653) 2020-05-29 16:38:03 -07:00
nicole mazzuca
09319cd79e
[vcpkg metrics] Allow someone to opt out after build (#11542)
* [vcpkg metrics] start using json library

Additionally, add floats to the JSON library since they're required.

* [vcpkg metrics] allow users to disable metrics after the build

Additionally, as a drive by, fix UUID generation

* fix metrics data

* code review
2020-05-29 14:09:03 -07:00
Billy O'Neal
d9b4acf02d
[vcpkg] Move CI cleaning back out of the 'ci' command into a separate command to restore cross-compilation preinstalls. (#11545) 2020-05-27 18:40:23 -07:00
nicole mazzuca
9d9a50bc98
[vcpkg] fix extern C around ctermid (#11343)
Additionally, move the system_header invocations to their own header file,
<vcpkg/base/system_header.h>
2020-05-20 10:10:26 -07:00
Billy O'Neal
0116b86e38
[vcpkg] Optimize string split slightly. (#11433) 2020-05-19 15:05:53 -07:00
Jack·Boos·Yu
f23ebed76f
[cmake] Update to 3.17.2 (#10767)
* [cmake] Update to 3.17.1

* update cmake directory name

* [cpuid] Fix install headers.

* [stormlib] Fix install headers

* [murmurhash] Fix install headers

* [metrohash] Fix install headers

* update baseline

* update baseline

* [otl] update hash

* update baseline

* [gts] Do not use ninja to avoid empty implib issue

* update baseline

* [dmlc] Re-trigger ci test

* [replxx] Re-trigger ci test

* update baseline

* [osg] Re-trigger ci test

* [replxx] Fix build failure

* Set cmake min version to 3.17.1

* update baseline

* [libnice] Re-trigger ci test

* [mlpack] Re-trigger ci test

* update to 3.17.2

* update cmake hash

* update baseline

* update baseline

* update baseline

* update baseline

* Update scripts/ci.baseline.txt

Co-authored-by: Billy O'Neal <billy.oneal@gmail.com>

* update baseline

* update baseline

* [magnum] Set magnum:arm64-windows to skip in baseline

* [nanogui] Set nanogui:arm64-windows to fail in baseline

* [nettle] Set nettle:x64-windows to fail, waiting for fix this issue in another PR

* re-trigger CI test

* update baseline

* Install unixODBC in Linux

* [nanodbc] Re-trigger CI test

* update baseline

* Remove space

* update baseline
2020-05-19 14:47:19 -07:00
Billy O'Neal
3b0080e3b0
[vcpkg] Harden file removals and clean directory contents in "CI" inside vcpkg itself. (#11432)
`files.h/files.cpp`:
* Add end and else comments to all macros.
* Add "remove_all_inside" function which empties a directory without actually deleting the directory. This is necessary to handle the case where the directory is actually a directory symlink.
* Change remove_all to use std::remove when VCPKG_USE_STD_FILESYSTEM is set; this will engage POSIX delete support available on current Win10.

`commands.ci.cpp`: empty "installed".

`*/initialize_environment.*`: No longer clean the directories outside the tool.

`ci-step.ps1`: Remove unused console output tee-ing.
2020-05-19 13:43:30 -07:00
Billy O'Neal
0e9e59f2c4
[vcpkg] Hardem expand environment strings path with explicit integer overflow checks and resistance to CP_ACP. (#11315) 2020-05-18 12:48:09 -07:00
Markus Rickert
47e9a1d1c1
[vcpkg] msbuild: do not build vcpkgmetricsuploader when -disableMetrics (#11368) 2020-05-18 11:05:23 -07:00
Billy O'Neal
8a583e80da
[vcpkg] Avoid naming Policheck sensitive term 'Virgin Islands' (#11339) 2020-05-15 22:38:39 -07:00
Billy O'Neal
5504dfa7da
[vcpkg] Turn on tests and PREfast in CI, and fix tests to pass. (#11239)
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-05-14 12:49:31 -07:00
shihaonan369
4727bc86a4
[vcpkg] Fix nuget package import failed. (#11093)
* fix bug that caused exported nuget package import failure.

* Give priority to nuget package to set $(VcpkgRoot).

* [vcpkg] Remove trailing whitespace

* fix nuget package import failed

Co-authored-by: 施浩男 <shihaonan@zhongli360.com>
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-05-13 23:37:15 -07:00
nicole mazzuca
6c159b7766
[vcpkg] Hopefully fix build on macOS 10.13/10.14 (#11205) 2020-05-11 16:31:04 -07:00
Tobias Funk
06c647e11a
[vcpkg] Resolve --overlay-ports is only working for relative parths since fix… (#11302)
* Resolve --overlay-ports is only working for relative parths since fix for https://github.com/microsoft/vcpkg/issues/10771
Fixes https://github.com/microsoft/vcpkg/issues/11301

* use auto instead of fs::path
2020-05-11 14:54:47 -07:00
Arsen Tufankjian
644ba5d998
[vcpkg] Adding support for finding VS2019 by environment variable (#10760)
* Fixing build with VS2019

* Added support for finding VS2019 by VS160COMNTOOLS env var

* [vcpkg] Explicitly handle trailing backslash in VS140 path.

* [vcpkg] Defer instance validation for VS160COMNTOOLS

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-05-08 12:43:30 -07:00
Robert Schumacher
8de3f323dc
[vcpkg] Resolve relative overlay ports to the current working directory. (#11233)
Fixes #10771.
2020-05-08 12:41:44 -07:00
Billy O'Neal
5db4f98d6e
Don't build the metrics uploader when metrics are disabled. (#11234) 2020-05-08 00:16:49 -07:00
Billy O'Neal
d7d410b50b
[vcpkg] Restrict telemetry uploads to TLS 1.2 (#11213)
* [vcpkg] Restrict telemetry uploads to TLS 1.2, as required by Azure security policy.

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2020-05-07 14:20:14 -07:00
nicole mazzuca
eb8efe7ca5
[vcpkg] always pass VSCMD_SKIP_SENDTELEMETRY=1 (#11202)
Fixes #10468
2020-05-06 15:56:47 -07:00
nicole mazzuca
46bf8c52cb
[vcpkg] fix bug in Filesystem::absolute (#11170)
* [vcpkg] fix bug in Filesystem::absolute

* flip the conditional for billy
2020-05-04 15:25:38 -07:00
Robert Schumacher
3ae3bd3445
[vcpkg] Warn on unmatched removal with reasonable alternative (#11083) 2020-04-30 09:43:55 -07:00
Robert Schumacher
9b91a53606
[vcpkg] Correctly record default feature list in BinaryParagraphs. Fixes #10678. (#11085) 2020-04-29 15:09:55 -07:00
Martin Hořeňovský
6ef805c2a9
[vcpkg] Small touchups for vcpkg unit tests (#11068)
* Do not disable expression decomposition in some optional tests

The tests are trivial enough that it is unlikely to come useful,
but the old usage is bad practice.

* Run tests in random order

This should prevent committing tests that are run-order dependent,
or at least shake them out eventually in CI.
2020-04-29 12:00:50 -07:00
Robert Schumacher
ce8b01a14b
[vcpkg] Add support for VCPKG_BINARY_SOURCES and --x-binarysource=<> (#10476)
* [vcpkg] Add support for VCPKG_BINARY_SOURCES and --binarysource=<>

* [vcpkg] Rename --binarysource to --x-binarysource to denote internal/experimental

* [vcpkg] Address review comments & add tests for BinaryConfigParser

* [vcpkg] Replace do {} while(1); with for(;;)

Avoids conditional expresion is constant warnings

* [vcpkg] Invert if/else

* [vcpkg] Fix warning in export.prefab.cpp

* [vcpkg] Resolve merge regressions
2020-04-29 10:16:40 -07:00
NancyLi1013
6709d3d7d0
[vcpkg] Fix toolsrc CMake build error (#10973) 2020-04-23 14:07:12 -07:00
nicole mazzuca
09af1e9b55
[vcpkg] Add initial JSON support (#10521)
* [vcpkg] Add initial JSON support

This adds a JSON parser, as well as the amount of unicode support
required for JSON parsing to work according to the specification. In the
future, I hope to rewrite our existing XML files into JSON.

Additionally, as a drive-by, we've added the following:

* add /wd4800 to pragmas.h -- this is a "performance warning", for when
  you implicitly convert pointers or integers to bool, and shouldn't be
  an issue for us.
* Switched Parse::ParserBase to read unicode (as utf-8), as opposed to
  ASCII
* Building again under VCPKG_DEVELOPMENT_WARNINGS, yay!
2020-04-17 18:16:20 -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
nicole mazzuca
12d75a13ac
[vcpkg] Fix build scripts on openSUSE and g++9 (#10867)
The existing code did not correctly pass `CXX` to cmake.
2020-04-17 10:56:27 -07:00
nicole mazzuca
22623e3501
[vcpkg] Clean up CMake build system (#10834)
There are quite a few changes to the CMake build system packaged up into
one set here:
* Added `toolsrc/cmake/utilities.cmake`, which contains the following:
  * `vcpkg_detect_compiler` -- get the name of the C++ compiler, as one
    of {gcc, clang, msvc}
  * `vcpkg_detect_standard_library` -- get the name of the standard
    library we're linking to, as one of {libstdc++, libc++, msvc-stl}
  * `vcpkg_detect_std_filesystem` -- figure out how to link and call
    into C++17's filesystem; whether one needs to link to `stdc++fs` or
    `c++fs`, and whether to use `<filesystem>` or
    `<experimental/filesystem>`.
* Added a `VCPKG_WARNINGS_AS_ERRORS`, split off from
  `VCPKG_DEVELOPMENT_WARNINGS`, which allows one to use the development
  warnings without passing -Werror
* Rename `DEFINE_DISABLE_METRICS` to `VCPKG_DISABLE_METRICS` -- the
  former will now print a deprecation message and set the latter.
* Now, print a deprecation message on `WERROR`; it doesn't do anything
  since the behavior it requested is now the default.
* Pass `-std=c++17` if the compiler allows it, instead of `-std=c++1z`
* Do some code movement
* Pass `USE_STD_FILESYSTEM` if possible, instead of only on minGW
  * Renamed to `VCPKG_USE_STD_FILESYSTEM`

Additionally, we now pass `/W4` in Debug mode on x86 in the Visual
Studio build system; this brings it in line with the CMake build system,
and the x64 Visual Studio build system.

And finally, we make some minor code changes to support compiling in
VCPKG_DEVELOPMENT_WARNINGS mode.
2020-04-14 22:08:50 -07:00
Alexander Neumann
0edffcf125
[vcpkg] New policy: SKIP_ARCHITECTURE_CHECK. (#10398)
* New policy: SKIP_DLL_ARCHITECTURE_CHECK.
The check only works if MS link.exe is used
otherwise the second linker member is missing
(according to the observed errors)

* rename to VCPKG_POLICY_SKIP_ARCHITECTURE_CHECK
since the dll check was ok but the lib check was failing.

* fix indentation

* move the if to a better position.
2020-04-09 17:04:20 -07:00
nicole mazzuca
1448db9d6f
[vcpkg-test] Fix the check for ability to make symlinks (#10543)
The old check checked to see if the computer was in developer mode _OR_ allowed sideloading apps, but we want _only_ developer mode.
2020-04-09 16:33:36 -07:00
nicole mazzuca
47a4913834
[vcpkg] Correct UInt128 code 😇 (#10583)
* [vcpkg] Correct UInt128 code 😇

`UInt128::operator<<(x, y)` should clear the bottom 64 bits of `x` if
`y >= 64`; however, we don't do this, and so we duplicate `x`'s bottom
bits into `x.top` instead of moving them. Similarly, we have the
opposite problem for `UInt128::operator>>`. This commit fixes these
latent bugs, which we weren't hitting because the thing we use them for
never actually shifts more than 64 bits.
2020-04-09 14:11:53 -07:00
atkawa7
52b5dfd2ef
Android Support: Exporting to Android Archive (AAR) (#10271)
* added android triplets

* added android support to vcpkg

* added export directories to git ignore

* fix libraries naming

* added vckpg sources to visual studio project files

* rename file location

* issue with std::string fs:path copy initialization

* format path on VStudio

* fix checks format cannot work on fs::path

* support header only libraries

* support using architecture instead of triplets

* added prefab support

* added debug logs and prefab debug flag

* added support for empty packages i.e openssl
2020-04-06 14:36:17 -07:00
Phoebe
8782b0b8b9
[vcpkg] Fix spec instance name (#10660)
* [vcpkg] Fix spec instance name

* Change cub version for testing the changes

* Add vulkan-hpp to test
2020-04-03 09:41:36 -07:00
Marc Boucek
e1fc03c474
vcpkg_from_git: Add support for git over ssh (#9446)
* vcpkg_from_git: Add support for git over ssh

* vcpkg_from_git: append ssh bin directory to path

* vcpkg_from_git: fix function signature on non windows platforms

* Revert "vcpkg_from_git: fix function signature on non windows platforms"

This reverts commit 0d608ee591.

* Revert "vcpkg_from_git: append ssh bin directory to path"

This reverts commit 377ce3fae1.

* Partial Revert "vcpkg_from_git: Add support for git over ssh"

This partially reverts commit 9b81b16c4c.

Co-authored-by: Marc Boucek <marc.boucek@native-instruments.de>
Co-authored-by: Marc Boucek <marc.boucek@posteo.net>
2020-04-01 07:35:38 -07:00
Alexander Neumann
aeffa625e5
[vcpkg] Add the possibility to load vcvars.bat with external toolchain. (#10399)
* Add VCPKG_LOAD_VCVARS_ENV
allow loading vcvars.bat if an external toolchain file is used.

* add documentation
2020-03-27 20:19:53 -07:00
Robert Schumacher
42ad12f91d
[vcpkg] Improve common case of ignoring filesystem errors (#10557) 2020-03-25 15:18:10 -07:00
Robert Schumacher
2fc82f6381
[vcpkg-help] Reflow and small cleanups (#10477) 2020-03-25 10:50:27 -07:00
Robert Schumacher
8b201cb43c
Merge pull request #10372 from ras0219-msft/dev/roschuma/jobs
[vcpkg] Introduce Job Objects to improve ctrl-c performance on Windows
2020-03-19 17:15:54 -07:00
Robert Schumacher
2c2e67f35f
Merge pull request #10032 from ras0219-msft/dev/roschuma/compute-all-abis
[vcpkg] Compute ABIs upfront instead of just-in-time
2020-03-19 11:50:15 -07:00
Robert Schumacher
4bf1cf35ba [vcpkg] Fill in feature lists during CI reporting 2020-03-18 12:18:24 -07:00
Robert Schumacher
44b9703a81 [vcpkg] Move package abi access after they have been computed 2020-03-18 11:48:33 -07:00
Robert Schumacher
090e7f8e76 [vcpkg] Write abi information to generated test results 2020-03-18 11:20:13 -07:00
Robert Schumacher
ebf8213945 [vcpkg] Use enum class for RestoreResult 2020-03-18 11:19:25 -07:00
Robert Schumacher
26949af8f8 [vcpkg-env] Restore previous behavior of cmd /c <arg> 2020-03-17 13:11:36 -07:00
Billy O'Neal
31cca07563
[vcpkg] Implement a warning when running in a mismatched Visual Studio prompt 2020-03-16 11:19:55 -07:00
Robert Schumacher
e2efb82aa8 [vcpkg] Fix build for non-windows 2020-03-13 21:00:21 -07:00
nicole mazzuca
42fa9b0c0b
[vcpkg] Fix tool lookup without which (#10375)
On Linux and macOS, if `which` is not installed (notably in Amazon's
amazonlinux docker base image), vcpkg fails to find system-installed
versions of tools. This is an issue when we don't attempt to install our
own versions of the tools, like with git (we fail to find any version of
git, and thus can't install any ports which come from a git repository).

Fixes #9927
2020-03-13 13:14:38 -07:00
Billy Robert O'Neal III
3cb8570203 Reorder []s. 2020-03-12 14:40:38 -07:00
Billy Robert O'Neal III
52214665b2 Add "vcvarsall" support. 2020-03-10 23:58:58 -07:00