-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configuring overlay ports and overlay triplets through the manifest (#…
…743) * overlays through manifest implemented * turned artifacts on * artifacts settings once more * fixed formatting * brought overlays to vcpkgpaths * artifacts settings * format * sending merged overlay triplets * moved constructor * passing parameters by reference * e2e tests * bad paths test * fix * resolves overlay paths relative to vcpkg-configuration.json * path fix * Update test config * modified make_relative_to_manifest * Fix build * changed lambda function * made manifest directory const * Revert * Revert lambda function * Add get_manifest_directory() * making make_relative_to_manifest cleaner * Comments * Comments Co-authored-by: Valeria Conde <[email protected]>
- Loading branch information
1 parent
9a92af8
commit a1e5a75
Showing
48 changed files
with
367 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
azure-pipelines/e2e_projects/overlays-bad-paths/env-overlays/vcpkg-empty-port/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
4 changes: 4 additions & 0 deletions
4
azure-pipelines/e2e_projects/overlays-bad-paths/env-overlays/vcpkg-empty-port/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "vcpkg-empty-port", | ||
"version": "0" | ||
} |
4 changes: 4 additions & 0 deletions
4
azure-pipelines/e2e_projects/overlays-bad-paths/my-triplets/x64-windows-static.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE static) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
|
4 changes: 4 additions & 0 deletions
4
azure-pipelines/e2e_projects/overlays-bad-paths/vcpkg-configuration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"overlay-ports": [ "./azure-pipelines/e2e_projects/overlays-project-with-config/config-overlays" ], | ||
"overlay-triplets": [ 123 ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"dependencies": [ | ||
"vcpkg-empty-port" | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
...cts/overlays-project-config-embedded/cli-overlays/another-vcpkg-empty-port/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
4 changes: 4 additions & 0 deletions
4
...rojects/overlays-project-config-embedded/cli-overlays/another-vcpkg-empty-port/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "another-vcpkg-empty-port", | ||
"version": "0" | ||
} |
21 changes: 21 additions & 0 deletions
21
...ines/e2e_projects/overlays-project-config-embedded/config-overlays/beicode/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO northwindtraders/beicode | ||
REF 19a1f95c2f56a27ced90227b5e2754a602a08e69 | ||
SHA512 7b2bb7acb2a8ff07bff59cfa27247a7b2cced03828919cd65cc0c8cf1f724f5f1e947ed6992dcdbc913fb470694a52613d1861eaaadbf8903e94eb9cdfe4d000 | ||
HEAD_REF main | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
PREFER_NINJA | ||
) | ||
vcpkg_install_cmake() | ||
vcpkg_fixup_cmake_targets() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
|
||
file( | ||
INSTALL "${SOURCE_PATH}/LICENSE" | ||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" | ||
RENAME copyright) |
6 changes: 6 additions & 0 deletions
6
...ipelines/e2e_projects/overlays-project-config-embedded/config-overlays/beicode/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "beicode", | ||
"version": "1.0.0", | ||
"description": "A simple utf-8 based unicode decoding and encoding library", | ||
"homepage": "https://github.com/northwindtraders/beicode" | ||
} |
1 change: 1 addition & 0 deletions
1
...2e_projects/overlays-project-config-embedded/env-overlays/vcpkg-empty-port/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
4 changes: 4 additions & 0 deletions
4
...es/e2e_projects/overlays-project-config-embedded/env-overlays/vcpkg-empty-port/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "vcpkg-empty-port", | ||
"version": "0" | ||
} |
4 changes: 4 additions & 0 deletions
4
...elines/e2e_projects/overlays-project-config-embedded/my-triplets/x64-windows-static.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE static) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
|
12 changes: 12 additions & 0 deletions
12
azure-pipelines/e2e_projects/overlays-project-config-embedded/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"dependencies": [ | ||
"fmt", | ||
"vcpkg-empty-port", | ||
"another-vcpkg-empty-port", | ||
"beicode" | ||
], | ||
"vcpkg-configuration": { | ||
"overlay-ports": [ "./config-overlays" ], | ||
"overlay-triplets": [ "./my-triplets" ] | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...rojects/overlays-project-with-config/cli-overlays/another-vcpkg-empty-port/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
4 changes: 4 additions & 0 deletions
4
...2e_projects/overlays-project-with-config/cli-overlays/another-vcpkg-empty-port/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "another-vcpkg-empty-port", | ||
"version": "0" | ||
} |
21 changes: 21 additions & 0 deletions
21
...ipelines/e2e_projects/overlays-project-with-config/config-overlays/beicode/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO northwindtraders/beicode | ||
REF 19a1f95c2f56a27ced90227b5e2754a602a08e69 | ||
SHA512 7b2bb7acb2a8ff07bff59cfa27247a7b2cced03828919cd65cc0c8cf1f724f5f1e947ed6992dcdbc913fb470694a52613d1861eaaadbf8903e94eb9cdfe4d000 | ||
HEAD_REF main | ||
) | ||
|
||
vcpkg_configure_cmake( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
PREFER_NINJA | ||
) | ||
vcpkg_install_cmake() | ||
vcpkg_fixup_cmake_targets() | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
|
||
file( | ||
INSTALL "${SOURCE_PATH}/LICENSE" | ||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" | ||
RENAME copyright) |
6 changes: 6 additions & 0 deletions
6
azure-pipelines/e2e_projects/overlays-project-with-config/config-overlays/beicode/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"name": "beicode", | ||
"version": "1.0.0", | ||
"description": "A simple utf-8 based unicode decoding and encoding library", | ||
"homepage": "https://github.com/northwindtraders/beicode" | ||
} |
1 change: 1 addition & 0 deletions
1
...es/e2e_projects/overlays-project-with-config/env-overlays/vcpkg-empty-port/portfile.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled) |
4 changes: 4 additions & 0 deletions
4
...elines/e2e_projects/overlays-project-with-config/env-overlays/vcpkg-empty-port/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "vcpkg-empty-port", | ||
"version": "0" | ||
} |
4 changes: 4 additions & 0 deletions
4
...-pipelines/e2e_projects/overlays-project-with-config/my-triplets/x64-windows-static.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
set(VCPKG_TARGET_ARCHITECTURE x64) | ||
set(VCPKG_CRT_LINKAGE static) | ||
set(VCPKG_LIBRARY_LINKAGE dynamic) | ||
|
4 changes: 4 additions & 0 deletions
4
azure-pipelines/e2e_projects/overlays-project-with-config/vcpkg-configuration.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"overlay-ports": [ "./config-overlays" ], | ||
"overlay-triplets": [ "./my-triplets" ] | ||
} |
8 changes: 8 additions & 0 deletions
8
azure-pipelines/e2e_projects/overlays-project-with-config/vcpkg.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"dependencies": [ | ||
"fmt", | ||
"vcpkg-empty-port", | ||
"another-vcpkg-empty-port", | ||
"beicode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
. $PSScriptRoot/../end-to-end-tests-prelude.ps1 | ||
|
||
# Tests a simple project with overlay ports and triplets configured on a vcpkg-configuration.json file | ||
$e2eProjects = "$PSScriptRoot/../e2e_projects" | ||
|
||
$manifestRoot = "$e2eProjects/overlays-project-with-config" | ||
$env:VCPKG_OVERLAY_PORTS = "$manifestRoot/env-overlays" | ||
|
||
Run-Vcpkg install --x-manifest-root=$manifestRoot ` | ||
--overlay-ports=$manifestRoot/cli-overlays ` | ||
--overlay-triplets=$manifestRoot/my-triplets ` | ||
--x-install-root=$installRoot | ||
Throw-IfFailed | ||
|
||
# Tests overlays configured in env and cli on a project with configuration embedded on the manifest file | ||
$manifestRoot = "$e2eProjects/overlays-project-config-embedded" | ||
$env:VCPKG_OVERLAY_PORTS = "$manifestRoot/env-overlays" | ||
Run-Vcpkg install --x-manifest-root=$manifestRoot ` | ||
--overlay-ports=$manifestRoot/cli-overlays ` | ||
--overlay-triplets=$manifestRoot/my-triplets ` | ||
--x-install-root=$installRoot | ||
Throw-IfFailed | ||
|
||
# Config with bad paths | ||
$manifestRoot = "$e2eProjects/overlays-bad-paths" | ||
$env:VCPKG_OVERLAY_PORTS = "$manifestRoot/env_overlays" | ||
Run-Vcpkg install --x-manifest-root=$manifestRoot ` | ||
--overlay-triplets=$manifestRoot/my-triplets ` | ||
--x-install-root=$installRoot | ||
Throw-IfNotFailed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.