Commit Graph

74 Commits

Author SHA1 Message Date
MonicaLiu
d07689ef16
[ports.cmake] vcpkg create: Fix the conditions for judging download result (#40956)
Co-authored-by: Monica <v-liumonica@microsoft.com>
2024-09-24 17:10:12 -04:00
Alexander Neumann
3f142d2fc6
Correctly add VCPKG_POST_PORTFILE_INCLUDES (#40097) 2024-07-25 14:10:55 -07:00
Alexander Neumann
b16e50152e
Add VCPKG_(PRE|POST)_PORTFILE_INCLUDES for code injection before/after the portfile (#25847) 2024-07-25 13:54:51 -07:00
Matthias Kuhn
874fff8a6a
Fixup Macho-O rpath for osx-dynamic (#39313) 2024-06-27 14:26:23 -07:00
Kai Pastor
47633daa65
[vcpkg-scripts] Catch use of ambiguous cmake vars (#34546)
Avoid wrong use of popular but ambiguous variables (`WIN32` etc.) in
scripts and portfiles by detection in CI.

Sometimes the variables are used wrongly, and sometimes this isn't
caught in PR review. This PR tries to catch those variables (when in the
active code path in script mode). [This can happen to every
contributor](https://github.com/microsoft/vcpkg/pull/34356#discussion_r1360074122),
even if he/she knows the rules ... vcpkg is raising the bar higher than
usual, having to deal with targets and hosts even in script mode.

(`b2-options.cmake` (boost fragment) shows where we get if we don't pay
attention: the same code being used in script mode (`WIN32` meaning
host) and in project mode (`WIN32` meaning target).)

The new check doesn't break any user builds because it relies on command
line options. However it changes the ABI hashes.
2024-06-14 11:40:01 -07:00
Billy O'Neal
e38b936343
Allow uname calls in download mode + Fix handling of files without RPATH (#37129)
... and don't fetch patchelf unless we actually need it. For example
cmake helper ports have no need to fetch patchelf.

In https://github.com/microsoft/vcpkg/pull/36056 , things were changed
to unconditionally patchelf when targeting Linux. Unfortunately that
broke --only-downloads a lot of the time. This fixes that.

Also contains @Osyotr 's fixes from
https://github.com/microsoft/vcpkg/pull/37190 to coalesce world rebuilds
a bit, so repeating comments from there:

Fixes https://github.com/microsoft/vcpkg/issues/37183
Towards https://github.com/microsoft/vcpkg/issues/25668
2024-03-07 15:19:17 -08:00
Alexander Neumann
2ac6ba173b
Refine rpath fixup to inspect already existing rpaths (#36056)
Reason:
```
-- Adjusting original rpath of: '/mnt/e/all/vcpkg/installed/x64-linux-release/lib/pkgconfig/../../lib/intel64/'
-- Fixed rpath in: '/mnt/e/all/vcpkg/packages/numpy_x64-linux-release/lib/python3.11/site-packages/numpy/linalg/lapack_lite.cpython-311-x86_64-linux-gnu.so' ('$ORIGIN:$ORIGIN/../../../../:$ORIGIN/../../../../intel64/')

```
needed `$ORIGIN/../../../../intel64/` in there which came from a pc file
via `-Wl,-rpath='${libdir}'`

---------

Co-authored-by: Osyotr <Osyotr@users.noreply.github.com>
2024-02-28 18:24:48 -08:00
Billy O'Neal
83712a6060
Improve and extract internals of vcpkg_find_acquire_program. (#34881)
* Extract vcpkg_extract_archive from vcpkg_find_acquire_program.

* Extract vcpkg_download_sourceforge from vcpkg_from_sourceforge.

This allows vcpkg_find_acquire_program to download from SourceForge without needing to temporarily change _VCPKG_EDITABLE.

* Use whether a URI is known for an entity to decide whether to downloads it rather than checking a separate supported_on_unix boolean.

* Add unparsed arguments check to vcpkg_extract_archive
2023-11-14 14:01:08 -08:00
Alexander Neumann
ced4b6dbc1
Remove unnecessary variables for better debug experience (#33435) 2023-10-02 22:05:35 -07:00
Jack·Boos·Yu
3f73dcd7f3
[vcpkg] Move include ports.cmake after defining multiple macros (#29916)
Co-authored-by: jyu49 <yu_jack@apple.com>
Co-authored-by: Monica <v-liumonica@microsoft.com>
2023-04-20 16:09:01 -07:00
autoantwort
cc63dc0f66
Update cmake to 3.25.1 (#28522)
* Update cmake to 3.25.1

* [libphonenumber] fix finding of protobuf

* Add zeroc-ice:x64-windows-static-md=fail

Co-authored-by: FrankXie <v-frankxie@microsoft.com>
Co-authored-by: Cheney-Wang <850426846@qq.com>
2023-01-15 11:04:04 -08:00
Billy O'Neal
ae76307e4b
Audit use of TO_NATIVE_PATH. (#26201)
* Audit use of TO_NATIVE_PATH.

TO_NATIVE_PATH should only be used when (1) pasting a path into a command line, or (2) displaying a path to a user. It must not be used before calling other CMake operations like file(WRITE.

Fixes https://github.com/microsoft/vcpkg/issues/26178

ports/ffmpeg/portfile.cmake:
Both uses are being embedded into a command line 

ports/gdal/dependency_win.cmake
117: This used TO_NATIVE_PATH but didn't actually connect the result. It's going on a command line so TO_NATIVE_PATH is appropriate.
Drive by: Added quotes around other uses (all of which seem to be going to command lines).
202: ${EXPAT_LIBRARY_REL} ${ZLIB_LIBRARY_REL} don't seem to be set even though they are used; I think this is wrong but I don't know for sure that it is so I'm leaving it alone for now.

ports/msmpi/portfile.cmake
All 3 uses are being embedded into a command line 

ports/jemalloc/fix-utilities.patch
ports/libproxy/fix-dependency-libmodman.patch
ports/qtbase/env.patch
These are in upstream content / context so it is not edited.

ports/opengl/portfile.cmake
Broken! Drive by fixes:
* Modernized checking VCPKG_BUILD_TYPE
* Ordered things consistently to be release then debug.
* Removed funny newlines.

ports/openni2/portfile.cmake
Borderline OK; it goes into an MSBuild / vcxproj. I'm leaving it alone. Drive by fixes:
* Guarded debug-only copies for VCPKG_BUILD_TYPE
* Fixed supports expression

ports/openssl/unix/CMakeLists.txt:
Unused!

ports/pthreads/portfile.cmake:
Both uses are being embedded into a command line 

ports/qt5-base/cmake/qt_fix_makefile_install.cmake
I'm not sure if this one is OK but it's being embedded into a file so it's probably fine.

ports/qtapplicationmanager/portfile.cmake:
I'm pretty sure this one is wrong, but it's guarded by VCPKG_TARGET_IS_WINDOWS so the ability to create damage is limited.

ports/readosm/portfile.cmake:
The use is being embedded into a command line 

ports/spatialite-tools/portfile.cmake:
The use is being embedded into a command line 

ports/sqlcipher/portfile.cmake:
Both uses are being embedded into a command line 

scripts/ports.cmake:
Some uses were unused, others are immediately used and printed to the console. 

scripts/buildsystems/vcpkg.cmake:
Fixed :)

scripts/cmake/vcpkg_build_qmake:
Looks unused.

scripts/cmake/vcpkg_build_process.cmake:
Added to console message only. 

scripts/cmake/vcpkg_execute_required_process_repeat.cmake:
Added to console message only. 
Drive by: Fixed typo in variable name in the message.

scripts/cmake/vcpkg_execute_required_process.cmake:
Added to console message only. 

* Fix missing license.
2022-08-12 15:21:20 -07:00
Osyotr
42b2876645
[vcpkg] Fixup rpath after building dynamic libraries on linux (#23035)
* Fixup rpath after building dynamic libraries on linux

* Switch back to a single variable VCPKG_FIXUP_ELF_RPATH

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>

* Don't force fixup in x64-linux triplet yet

Co-authored-by: Victor Romero <romerosanchezv@gmail.com>
Co-authored-by: Osyotr <8740768+Osyotr@users.noreply.github.com>
2022-07-18 12:44:34 -07:00
Thomas1664
c69f2b9098
[vcpkg] Add vcpkg_install_copyright() portfile function (#25239)
* [vcpkg tool] Add vcpkg_install_copyright

* Make sure FILE_LIST is provided

* relative to ${SOURCE_PATH}

* Add documentation

* Add to table of contents

* Relative paths was a bad idea.

* Tell users to use the correct way

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

* Fix docs

* Add parameter COMMENT

* Rename to vcpkg_concat_copyright

* Fix escape

* Revert "Fix escape"

This reverts commit 53f1636705.

* Revert "Rename to vcpkg_concat_copyright"

This reverts commit 6ce9152a61.

* Fix escape

* Add support for single copyright file

* Update docs

* Make comment less confusing

* [ci skip] Billy CR

* [ci skip] Format

* Remove explicit checks for STREQUAL ""

* Add error msg if file doesn't exist

Co-authored-by: Billy O'Neal <bion@microsoft.com>
2022-07-13 09:41:52 -07:00
SunBlack
6a66e95caa
[vcpkg.cmake][ports.cmake] Prefer STREQUAL over MATCHES (#23014)
Co-authored-by: Heiko Thiel <heiko.thiel@hpi.de>
2022-05-24 12:11:39 -07:00
Jack·Boos·Yu
0d7603c4ef
[vcpkg_setup_pkgconfig_path] Add new functions to set or restore pkgconfig related environment variables (#23429)
* [vcpkg_configure_meson] Fix append host path

* New functions vcpkg_setup_pkgconfig_path and vcpkg_restore_pkgconfig_path

* Fix bug, add cos

* Apply suggestions

* Apply suggestions

* Apply suggestion

* doc

* Update docs/maintainers/vcpkg_setup_pkgconfig_path.cmake.md

Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>

* Update scripts/cmake/vcpkg_setup_pkgconfig_path.cmake

Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>

* Update scripts/cmake/vcpkg_configure_make.cmake

* Apply suggestions

* Apply suggestion

* Apply suggestions

Co-authored-by: Victor Romero <viromer@microsoft.com>
Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>
2022-05-09 17:23:32 -07:00
autoantwort
6ba505cf2c
[vcpkg] collect error logs in logs.txt in the buildtrees folder (#22146)
* collect error logs in logs.txt in the buildtrees folder

* Use global variable

* rename file to error-logs-.txt and remove error: prefix in file
2022-01-28 11:30:49 -08:00
Jack·Boos·Yu
520b5c4851
[vcpkg_download_distfile] Fix the parameter mismatch issues of some internal functions and fix the recursive call (step 3) (#20585)
* [vcpkg_download_distfile] Fix incorrect arguments in z_vcpkg_download_distfile_test_hash

* Add parameter DISABLE_AIRA2 to avoid recursive calls

* Pass SKIP_SHA512

* Update doc

* typo

* Use downloaded aria2, fix download for multiple url

* typo

* Update vcpkg min release version 2021-11-02

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-11-25 23:21:00 -08:00
Jack·Boos·Yu
5283cdb370
[scripts-audit] Make buildsystem (#20165)
* [script-audit] Make buildsystem

* Fix wrongly merge

* Fix rename

* Format

* Apply suggestions

* Apply suggestion

* Fix bug

* Change the function names

* Fix command line

* Apply suggestions

* version

* typo

* Apply suggestions

* Fix bug

* Fix path

* Fix bug

* Fix un=parser code, move macros to the top

* Apply suggestions

* Update docs

* update doc

* CRLF

* add docs and add a PARENT_SCOPE

* Update doc

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2021-10-20 14:12:58 -07:00
nicole mazzuca
f0281bf749
[scripts-audit] vcpkg_fixup_pkgconfig (#19658)
* [scripts-audit] vcpkg_fixup_pkgconfig

* Neumann-A CR, fix docs

* vcpkg_fixup_pkgconfig bugs

* fix group

* moar fixing

* be more clever around pkg_config_path

* add `vcpkg_host_path_list` so that we can unit test

* move stuff around a bit

* fix bug in vcpkg_host_path_list.cmake

* ras0219 CRs
2021-09-27 13:27:44 -07:00
nicole mazzuca
99e06a64ec
[rollup:2021-08-09] Rollup PR (#19469)
* [rollup:2021-08-09] PR #16706 (@JackBoosY)

[vcpkg_fixup_cmake_targets] Fix up OSX system development path

* [rollup:2021-08-09] PR #19238 (@strega-nil)

[scripts-audit] vcpkg_download_distfile

* [rollup:2021-08-09] PR #19239 (@strega-nil)

[scripts-audit] vcpkg_find_fortran

* [rollup:2021-08-09] PR #19338 (@strega-nil)

[tinyfiledialogs] Fix for good

* [rollup:2021-08-09] PR #19348 (@strega-nil)

[scripts-audit] vcpkg_fixup_pkgconfig

* fix ports.cmake with newer vcpkg_download_distfile

* fix vcpkg create

* move vcpkg_common_definitions down so that it's not incorrect

* fix vcpkg_internal_get_cmake_vars

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2021-08-16 13:42:31 -07:00
Jack·Boos·Yu
9d4c559751
[cmake] Update to 3.21.1 (#18955) 2021-08-11 17:06:39 -07:00
nicole mazzuca
5304f826b5
[rollup] 2021-07-26 (#19157)
* [rollup:2021-07-26 1/6] PR #18783 (@strega-nil)

[scripts-audit] vcpkg_copy_tools and friends

* [rollup:2021-07-26 2/6] PR #18898 (@dg0yt)

[vcpkg] Fix toolchain compatibility with cmake < 3.15

* [rollup:2021-07-26 3/6] PR #18980 (@strega-nil)

[cmake-guidelines] Minor update, for `if()`

* [rollup:2021-07-26 4/6] PR #18981 (@strega-nil)

[scripts-audit] vcpkg_check_linkage

* [rollup:2021-07-26 5/6] PR #19158 (@Hoikas)

[vcpkg.cmake] Fix variable case.

* [rollup:2021-07-26 6/6] PR #18839

[scripts-audit] z_vcpkg_get_cmake_vars

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
2021-07-29 09:47:35 -07:00
nicole mazzuca
0e1dc12185
[rollup] Rollup PR 2021-07-16 (#19001)
* [rollup:2021-07-16 1/7] PR #18201 (@JackBoosY)

[vcpkg-cmake] Add check for unused cmake variables

* [rollup:2021-07-16 2/7] PR #18397 (@strega-nil)

[vcpkg_list] add new function

* [rollup:2021-07-16 3/7] PR #18782 (@strega-nil)

[scripts-audit] vcpkg_build_ninja

* [rollup:2021-07-16 4/7] PR #18784 (@strega-nil)

[scripts-audit] vcpkg_minimum_required

* [rollup:2021-07-16 5/7] PR #18785 (@strega-nil)

[scripts-audit] vcpkg_replace_string

* [rollup:2021-07-16 6/7] PR #18786 (@strega-nil)

[scripts-audit] windows scripts

* [rollup:2021-07-16 7/7] PR #18945 (@strega-nil)

[many ports] remove deprecated vcpkg_check_features call [1/5]

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com>
2021-07-20 10:24:58 -07:00
nicole mazzuca
d369df7ecf
[rollup:2021-07-06] Rollup PR (#18838)
* [rollup:2021-07-06 1/8] PR #18272 (@strega-nil)

[scripts-audit] vcpkg_from_*

* [rollup:2021-07-06 2/8] PR #18319 (@strega-nil)

[scripts-audit] add guidelines for cmake

* [rollup 2021-07-06 3/8] PR #18410 (@mheyman)

[vcpkg-cmake-config] documentation fix

* [rollup:2021-07-06 4/8] PR #18488 (@strega-nil)

[scripts-audit] vcpkg_execute_*

* [rollup:2021-07-06 5/8] PR #18517 (@strega-nil)

[scripts-audit] vcpkg_extract_source_archive

* [rollup:2021-07-06 6/8] PR #18674 (@NancyLi1013)

[vcpkg doc] Update examples

* [rollup:2021-07-06 7/8] PR #18695 (@JackBoosY)

[vcpkg] Update the minimum version of vcpkg

* [rollup:2021-07-06 8/8] PR #18758 (@ras0219-msft)

[vcpkg_from_git] Fix error if downloads folder does not exist

* build docs!

* fix bond:*-windows

* fix nmap

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: Michael Heyman <Michael.Heyman@jhuapl.edu>
Co-authored-by: NancyLi1013 <lirui09@beyondsoft.com>
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: Robert Schumacher <ras0219@outlook.com>
2021-07-14 12:45:18 -07:00
nicole mazzuca
0e914ba681
[scripts-audit] Rollup 2021-05-21 (#18112)
* [scripts-audit] vcpkg_acquire_msys (#17687)

* [vcpkg.cmake] Change find_package function -> macro in order to shorten trace (#17997)

switch from function to macro

* [scripts-audit] z_vcpkg_apply_patches (#18013)

* [scripts-audit] z_vcpkg_escape_regex_control_characters (#18013)

* [scripts-audit] vcpkg_fail_port_install (#18054)

Note that this change allows existing failures;
it changes MATCHES to STREQUAL, meaning that
vcpkg_fail_port_install(ON_ARCH "arm") now succeeds on arm64;
this change in behavior is fine (IMO) since it strictly succeeds
when it used to fail.
2021-05-26 13:40:48 -07:00
nicole mazzuca
253c561a2c
[scripts-audit] gn buildsystem (#17776)
* [scripts-audit] Remove vcpkg_build_gn

This command has never been used (git log -S"vcpkg_build_gn\("
gives no results outside of the file itself and docs)
and so shrink the public interface surface

* [scripts-audit] gn buildsystem

* format

* oops

* aaaugh

* cr
2021-05-17 11:08:33 -07:00
nicole mazzuca
fe2a6bb789
[host dependencies] add support in the scripts (#16627)
This contains all the docs and scripts changes from #16479,
without any of the ports changes, for easier CR
2021-03-10 15:33:16 -08:00
nicole mazzuca
3426db05b9
[scripts-audit] Rollup PR 2021-02-26 (#16440)
* [scripts-audit rollup] PR #16419

* pull the cmake doc comment parsing out into its own function
* support cmake helper ports
* add real support for deprecation, as opposed to ad-hoc

* [scripts-audit rollup] PR #16192

* add a z_ in front of internal functions
* move internal functions out

set feature_vars again in parent scope

* [scripts-audit rollup] PR #16309

Audit vcpkg_copy_pdbs

* [scripts-audit rollup] PR #16304

* Fix usage, documentation

* [scripts-audit rollup] PR #16393

* [scripts-audit rollup] PR #16377

Deprecate `vcpkg_*_cmake` in favor of `vcpkg_cmake_*` from the
`vcpkg-cmake` port, as well as `vcpkg_fixup_cmake_targets`
in favor of `vcpkg_cmake_config_fixup` from the
`vcpkg-cmake-config` port.
2021-02-28 13:17:19 -08:00
nicole mazzuca
f3a4d1aeb7
[scripts audit] ports.cmake (#16257)
* [scripts audit] ports.cmake

* [testing] modify triplet files to test all ports
2021-02-18 14:27:41 -08:00
nicole mazzuca
545c165ce0
[(z_)vcpkg_prettify_command(_line)] Scripts Tree Audit (#16130)
* [vcpkg_prettify_command] Audit

* rename file

* rename out-var in docs

* fix file path

* add internal use message to docs

* escapin' in z_vcpkg_prettify_command_line

* regenerate docs
2021-02-09 15:53:36 -08:00
Billy O'Neal
4d136ef25f
[vcpkg] Add vcpkg_minimum_required as a replacement for VERSION.txt. (#15638) 2021-01-20 12:07:41 -08:00
ras0219
815396fa4e
[vcpkg] Refactor end-to-end tests (#15081)
* [vcpkg] Refactor end-to-end tests

* [vcpkg] Cherry-pick x-builtin-ports-root from #14999

* [vcpkg] Move create test from unit tests to e2e

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
2020-12-15 10:26:00 -08:00
Alexander Neumann
8de4ee858f
[vcpkg/scripts] Add a way to get cmake compiler settings/flags (#12936)
* add function get_cmake_vars

* fine tuning.

* apply to make based ports.

* add log suffix on not windows platforms

* fix c&p error

* add previous LINK env

* setup env on windows and extract cpp flags correctly.

* Apply suggestions from code review

* commit changes from fontconfig PR

* Apply suggestions from code review

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

* cleanup docs

* add conversion from somelib.lib to -lsomelib

* add missing ar-lib wrapper

* small but important regex correction

* add latest changes from update_fontconfig PR

* Apply suggestions from code review

first set which don't need special attention

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

* Apply suggestions from code review

one more simple change

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

* [x264] set env AS

* fix bugs due to refactor

* use subpath everywhere

* apply changes from CR

* remove unnecessary lines 41 & 44

* remove flag transformation

* reintroduce the flag / to - transformation for MSVC

* Apply suggestions from code review

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

* rename the function

* rename function/variables

* transform flags list

* Apply suggestions from code review

* fix vcpkg_build_make due to the variable name change

* fix another case of function renaming regressions

* only rename config.log if it exists

* actually add the script after vcpkg_common_functions was deleted.

* remove setting of ldflags if path contains spaces

Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
2020-11-10 09:52:02 -08:00
Billy O'Neal
09a647a526
Delete use of vcpkg_test_cmake and vcpkg_common_functions. (#13065) 2020-10-28 14:18:07 -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
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
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
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
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
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
Alexander Neumann
bd8c07217a [vcpkg] Add skip dumpbin checks
and correct some cmake advices.
Paths should always be handled with "${PATH}" due to possible spaces
2020-02-04 10:58:38 +01:00
Phil Christensen
e62d136128
[vcpkg] Add Supports: field. Use contents of triplets instead of names for dependency resolution. (#8601)
* 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>
2020-02-03 14:22:52 -08:00
martin-s
299c7c730c Introduce new policy to skip post verification of dll exports (#9642)
* - Introduce new policy to skip post verification of dll exports (see issue #9641).

* - Fixed line endings.
2020-01-13 16:31:58 -08:00
Tetsuya Hayashi
726b7a6618 [ports.cmake] Fixup capitalization inconsistencies of Windows drive letter. (#8304)
CMAKE_CURRENT_LIST_DIR reflect current directory. Thus It can be lowercase drive letter.
The lowercase drive letter cause #8237 issue.
Fixup drive letter to uppercase by using get_filename_component().
2019-09-24 15:58:10 -07:00
martin-s
191c864927 Fix bug in .vcpkg-root detection that breaks --overlay-triplets (#7954)
* - 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
2019-09-12 23:52:52 -07:00
martin-s
95f9df7134 - Fixed ports script. (#7793) 2019-08-22 14:55:50 -07:00
Curtis J Bezault
4da95d667c
[vcpkg]Port toolchains (#7687)
* 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
2019-08-20 08:47:26 -07:00
Curtis J Bezault
18c849daea
Merge branch 'master' into external_file_abi 2019-07-19 08:08:08 -07:00
Curtis J Bezault
618fa203c1
[vcpkg] Portfile Settings (#7292) 2019-07-19 08:01:38 -07:00