Skip to content

Commit dfee952

Browse files
vicromsCopilot
andcommitted
Refine eval test ports
- Move LICENSE into project/, use CMAKE_CURRENT_LIST_DIR - feature-c now depends on vcpkg-ci-eval-b[feature-a] for file conflicts - Simplify eval-b portfile (direct file install, no CMake needed) - Remove vcpkg-cmake dep from eval-b - Early return for core-only install Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d27ffb4 commit dfee952

6 files changed

Lines changed: 65 additions & 80 deletions

File tree

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
if(NOT "feature-a" IN_LIST FEATURES AND NOT "feature-b" IN_LIST FEATURES AND NOT "feature-c" IN_LIST FEATURES)
2+
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
3+
return()
4+
endif()
5+
16
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
27
FEATURES
38
feature-a WITH_FEATURE_A
@@ -6,7 +11,7 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
611
)
712

813
vcpkg_cmake_configure(
9-
SOURCE_PATH "${CURRENT_PORT_DIR}/project"
14+
SOURCE_PATH "${CMAKE_CURRENT_LIST_DIR}/project"
1015
OPTIONS ${FEATURE_OPTIONS}
1116
)
1217

@@ -18,13 +23,7 @@ if("feature-b" IN_LIST FEATURES OR "feature-c" IN_LIST FEATURES)
1823
vcpkg_cmake_install()
1924
endif()
2025

21-
if("feature-b" IN_LIST FEATURES)
22-
vcpkg_install_copyright(FILE_LIST "${CURRENT_PORT_DIR}/copyright")
23-
elseif("feature-c" IN_LIST FEATURES)
24-
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "MIT\n")
25-
endif()
26-
27-
if(NOT "feature-a" IN_LIST FEATURES AND NOT "feature-b" IN_LIST FEATURES AND NOT "feature-c" IN_LIST FEATURES)
28-
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
29-
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "MIT\n")
26+
if(NOT "feature-b" IN_LIST FEATURES)
27+
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
28+
vcpkg_install_copyright(FILE_LIST "${CMAKE_CURRENT_LIST_DIR}/project/LICENSE")
3029
endif()
File renamed without changes.
Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
1-
{
2-
"name": "vcpkg-ci-eval-a",
3-
"version-date": "2026-05-03",
4-
"description": "CI evaluation test port A.",
5-
"supports": "!uwp",
6-
"dependencies": [
7-
{
8-
"name": "vcpkg-cmake",
9-
"host": true
10-
}
11-
],
12-
"features": {
13-
"feature-a": {
14-
"description": "Test scenario A.",
15-
"supports": "windows"
16-
},
17-
"feature-b": {
18-
"description": "Test scenario B."
19-
},
20-
"feature-c": {
21-
"description": "Test scenario C.",
22-
"supports": "windows"
23-
},
24-
"feature-d": {
25-
"description": "Test scenario D.",
26-
"dependencies": [
27-
"vcpkg-ci-eval-b"
28-
]
29-
}
30-
}
31-
}
1+
{
2+
"name": "vcpkg-ci-eval-a",
3+
"version-date": "2026-05-03",
4+
"description": "CI evaluation test port A.",
5+
"supports": "!uwp",
6+
"dependencies": [
7+
{
8+
"name": "vcpkg-cmake",
9+
"host": true
10+
}
11+
],
12+
"features": {
13+
"feature-a": {
14+
"description": "Test scenario A.",
15+
"supports": "windows"
16+
},
17+
"feature-b": {
18+
"description": "Test scenario B."
19+
},
20+
"feature-c": {
21+
"description": "Test scenario C.",
22+
"dependencies": [
23+
{
24+
"name": "vcpkg-ci-eval-b",
25+
"features": [
26+
"feature-a"
27+
]
28+
}
29+
]
30+
},
31+
"feature-d": {
32+
"description": "Test scenario D.",
33+
"dependencies": [
34+
"vcpkg-ci-eval-b"
35+
]
36+
}
37+
}
38+
}
Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
2-
FEATURES
3-
feature-a WITH_FEATURE_A
4-
)
5-
6-
vcpkg_cmake_configure(
7-
SOURCE_PATH "${CURRENT_PORT_DIR}/project"
8-
OPTIONS ${FEATURE_OPTIONS}
9-
)
10-
111
if("feature-a" IN_LIST FEATURES)
12-
vcpkg_cmake_install()
13-
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "MIT\n")
2+
file(INSTALL
3+
DESTINATION "${CURRENT_PACKAGES_DIR}/include/vcpkg-ci-eval"
4+
FILES "${CMAKE_CURRENT_LIST_DIR}/project/config.h"
5+
)
146
else()
157
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
16-
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "MIT\n")
178
endif()
9+
10+
file(WRITE "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" "MIT\n")

scripts/test_ports/vcpkg-ci-eval-b/project/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
{
2-
"name": "vcpkg-ci-eval-b",
3-
"version-date": "2026-05-03",
4-
"description": "CI evaluation test port B.",
5-
"supports": "!uwp & !(arm64 & linux)",
6-
"dependencies": [
7-
{
8-
"name": "vcpkg-cmake",
9-
"host": true
10-
}
11-
],
12-
"features": {
13-
"feature-a": {
14-
"description": "Test scenario A.",
15-
"supports": "windows"
16-
}
17-
}
18-
}
1+
{
2+
"name": "vcpkg-ci-eval-b",
3+
"version-date": "2026-05-03",
4+
"description": "CI evaluation test port B.",
5+
"supports": "!uwp & !(arm64 & linux)",
6+
"features": {
7+
"feature-a": {
8+
"description": "Test scenario A.",
9+
"supports": "windows"
10+
}
11+
}
12+
}

0 commit comments

Comments
 (0)