Skip to content

Commit

Permalink
[boost-cobalt] Throw error in the configure step when the compiler is…
Browse files Browse the repository at this point in the history
… not supported (#42738)

Co-authored-by: jyu49 <[email protected]>
  • Loading branch information
JackBoosY and jyu49 authored Dec 30, 2024
1 parent c2a3eb2 commit 3fb4357
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 9 deletions.
13 changes: 13 additions & 0 deletions ports/boost-cobalt/fail-on-compiler-not-supported.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5a51d5285c..8374f911a6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,7 +14,7 @@ project(boost_cobalt VERSION "${BOOST_COBALT_VERSION}" LANGUAGES CXX)

include(cmake/CheckRequirements.cmake)
if (NOT BOOST_COBALT_REQUIREMENTS_MATCHED)
- return()
+ message(FATAL_ERROR "The current compiler is not supported.")
endif()

set(BOOST_COBALT_IS_ROOT OFF)
5 changes: 4 additions & 1 deletion ports/boost-cobalt/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Automatically generated by scripts/boost/generate-ports.ps1
# Automatically generated by scripts/boost/generate-ports.ps1

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO boostorg/cobalt
REF boost-${VERSION}
SHA512 a92ff4050772b61035121f944d81d4a9d6d2da858dedc0956ad850132657c80c660a8839a99597443751744577dd5b0958239e99d948d3036c85b8361151aa27
HEAD_REF master
PATCHES
fail-on-compiler-not-supported.patch

)

set(FEATURE_OPTIONS "")
Expand Down
1 change: 1 addition & 0 deletions ports/boost-cobalt/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
"name": "boost-cobalt",
"version": "1.86.0",
"port-version": 1,
"description": "Boost cobalt module",
"homepage": "https://www.boost.org/libs/cobalt",
"license": "BSL-1.0",
Expand Down
16 changes: 11 additions & 5 deletions ports/boost/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$comment": "Automatically generated by scripts/boost/generate-ports.ps1",
"name": "boost",
"version": "1.86.0",
"port-version": 1,
"description": "Peer-reviewed portable C++ source libraries",
"homepage": "https://boost.org",
"license": "BSL-1.0",
Expand Down Expand Up @@ -71,11 +72,6 @@
"name": "boost-circular-buffer",
"version>=": "1.86.0"
},
{
"name": "boost-cobalt",
"platform": "!osx & !ios & !android & !uwp",
"version>=": "1.86.0"
},
{
"name": "boost-compat",
"version>=": "1.86.0"
Expand Down Expand Up @@ -627,6 +623,16 @@
}
],
"features": {
"cobalt": {
"description": "Build boost-cobalt",
"dependencies": [
{
"name": "boost-cobalt",
"platform": "!osx & !ios & !android & !uwp",
"version>=": "1.86.0"
}
]
},
"mpi": {
"description": "Build with MPI support",
"dependencies": [
Expand Down
8 changes: 7 additions & 1 deletion scripts/boost/generate-ports.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ $semverVersion = ($version -replace "(\d+(\.\d+){1,3}).*", "`$1")
# Clear this array when moving to a new boost version
$defaultPortVersion = 0
$portVersions = @{
'boost-build' = 1
'boost' = 1;
'boost-build' = 1;
'boost-cobalt' = 1
}

function Get-PortVersion {
Expand All @@ -50,6 +52,10 @@ $portData = @{
"mpi" = @{
"description" = "Build with MPI support";
"dependencies" = @("boost-mpi", "boost-graph-parallel", "boost-property-map-parallel");
};
"cobalt" = @{
"description" = "Build boost-cobalt";
"dependencies" = @("boost-cobalt");
}
}
};
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/boost-cobalt.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3195a6c18219720b8c98b5d449ff39b95535122e",
"version": "1.86.0",
"port-version": 1
},
{
"git-tree": "d45758e6c62b46ef436df6cffe7803dfc3ba8f10",
"version": "1.86.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/b-/boost.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "15e0de9e647ed1ddf684158c8dc629544c2fe53b",
"version": "1.86.0",
"port-version": 1
},
{
"git-tree": "e16c1af1e47c7b94ac02c8f3c9ec0f4d3ea8f8f6",
"version": "1.86.0",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@
},
"boost": {
"baseline": "1.86.0",
"port-version": 0
"port-version": 1
},
"boost-accumulators": {
"baseline": "1.86.0",
Expand Down Expand Up @@ -818,7 +818,7 @@
},
"boost-cobalt": {
"baseline": "1.86.0",
"port-version": 0
"port-version": 1
},
"boost-compat": {
"baseline": "1.86.0",
Expand Down

0 comments on commit 3fb4357

Please sign in to comment.