mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 01:24:47 +08:00
[outcome] Replace Outcome single header based port with full fat cmake install port (#15603)
* Replace Outcome single header based port with full fat cmake install port. * [outcome] Improve portfile.cmake * update baseline * Refactor @JackBoosY's changes to make the dependency SHA feature chosen. * update baseline * Fix outcome features so they actually work. * update baseline * [outcome] install usage * update baseline * [outcome] Always use vcpkg copies of dependencies * DO NOT MERGE YET, ONLY FOR INSPECTION BY PR REVIEW. 1. Break out these dependencies into standalone ports: - ned14-internal-quickcpplib - status-code 2. Add port for LLFIO. 3. Add dependency smoke tests for Outcome and LLFIO as per instructions. * Fix all remaining issues, including link failure. This changeset is now ready to merge into vcpkg. * Update versions. * Have LLFIO not build static or shared libs according to VCPKG_LIBRARY_LINKAGE. * Fix last commit breaking everything :) * Update versions. * Disable uwp support for LLFIO. * versions * Fix status code on GCC 6 and 7 * Don't download ntkernel-error-category if not on Windows. * Fix status-code on UWP. * Update versions. * Fix MSVC on ARM. * Apply all the feedback from the PR review, more or less. * versions * Update to latest, disable UWP for Outcome. Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
This commit is contained in:
parent
1054567984
commit
a434cc74ea
12
ports/llfio/CONTROL
Normal file
12
ports/llfio/CONTROL
Normal file
@ -0,0 +1,12 @@
|
||||
Source: llfio
|
||||
Version: 2.0-a74411ed
|
||||
Homepage: https://github.com/ned14/llfio
|
||||
Description: P1031 low level file i/o and filesystem library for the C++ standard
|
||||
Build-Depends: outcome
|
||||
Supports: !(uwp|static)
|
||||
|
||||
Feature: status-code
|
||||
Description: Have LLFIO use SG14 `status_code` (proposed `std::error`) instead of `std::error_code`.
|
||||
|
||||
Feature: run-tests
|
||||
Description: Build and run the dependency validation tests
|
91
ports/llfio/portfile.cmake
Normal file
91
ports/llfio/portfile.cmake
Normal file
@ -0,0 +1,91 @@
|
||||
message(WARNING [=[
|
||||
LLFIO depends on Outcome which depends on QuickCppLib which uses the vcpkg versions of gsl-lite and byte-lite, rather than the versions tested by QuickCppLib's, Outcome's and LLFIO's CI. It is not guaranteed to work with other versions, with failures experienced in the past up-to-and-including runtime crashes. See the warning message from QuickCppLib for how you can pin the versions of those dependencies in your manifest file to those with which QuickCppLib was tested. Do not report issues to upstream without first pinning the versions as QuickCppLib was tested against.
|
||||
]=])
|
||||
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ned14/llfio
|
||||
REF a74411eddb6401ab884c5f92cccc24b9a64a9e6f
|
||||
SHA512 e0f8b030ac995c24135aae89450f05ad75e5fed10caec254b327f1fc0d4c23eaeb53b7859e5e5b4731ffeace9fdfc75cd04a66025243e7f35c7dea37dc0d1b6c
|
||||
HEAD_REF develop
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH NTKEC_SOURCE_PATH
|
||||
REPO ned14/ntkernel-error-category
|
||||
REF bbd44623594142155d49bd3ce8820d3cf9da1e1e
|
||||
SHA512 589d3bc7bca98ca8d05ce9f5cf009dd98b8884bdf3739582f2f6cbf5a324ce95007ea041450ed935baa4a401b4a0242c181fb6d2dcf7ad91587d75f05491f50e
|
||||
HEAD_REF master
|
||||
)
|
||||
endif()
|
||||
|
||||
vcpkg_check_features(
|
||||
OUT_FEATURE_OPTIONS LLFIO_FEATURE_OPTIONS
|
||||
FEATURES
|
||||
status-code LLFIO_USE_EXPERIMENTAL_SG14_STATUS_CODE
|
||||
)
|
||||
|
||||
# LLFIO needs a copy of QuickCppLib with which to bootstrap its cmake
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/quickcpplib"
|
||||
DESTINATION "${SOURCE_PATH}/quickcpplib/repo/include/"
|
||||
)
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/share/ned14-internal-quickcpplib/"
|
||||
DESTINATION "${SOURCE_PATH}/quickcpplib/repo/"
|
||||
)
|
||||
|
||||
# LLFIO expects ntkernel-error-category to live inside its include directory
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/include/llfio/ntkernel-error-category")
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
file(RENAME "${NTKEC_SOURCE_PATH}" "${SOURCE_PATH}/include/llfio/ntkernel-error-category")
|
||||
endif()
|
||||
|
||||
# Already installed dependencies don't appear on the include path, which LLFIO assumes.
|
||||
string(APPEND VCPKG_CXX_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"")
|
||||
string(APPEND VCPKG_C_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"")
|
||||
|
||||
set(extra_config)
|
||||
# cmake does not correctly set CMAKE_SYSTEM_PROCESSOR when targeting ARM on Windows
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm" OR VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64"))
|
||||
list(APPEND extra_config -DLLFIO_ASSUME_CROSS_COMPILING=On)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DPROJECT_IS_DEPENDENCY=On
|
||||
-Dquickcpplib_FOUND=1
|
||||
-Doutcome_FOUND=1
|
||||
${LLFIO_FEATURE_OPTIONS}
|
||||
-DLLFIO_ENABLE_DEPENDENCY_SMOKE_TEST=ON # Leave this always on to test everything compiles
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
||||
${extra_config}
|
||||
)
|
||||
|
||||
# LLFIO install assumes that the static library is always built
|
||||
vcpkg_build_cmake(TARGET _sl)
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
vcpkg_build_cmake(TARGET _dl)
|
||||
endif()
|
||||
|
||||
if("run-tests" IN_LIST FEATURES)
|
||||
vcpkg_build_cmake(TARGET test)
|
||||
endif()
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/llfio)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
if("status-code" IN_LIST FEATURES)
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage-status-code-${VCPKG_LIBRARY_LINKAGE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
else()
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage-error-code-${VCPKG_LIBRARY_LINKAGE}" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
endif()
|
||||
file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
9
ports/llfio/usage-error-code-dynamic
Normal file
9
ports/llfio/usage-error-code-dynamic
Normal file
@ -0,0 +1,9 @@
|
||||
The package llfio provides two CMake targets:
|
||||
|
||||
find_package(llfio CONFIG REQUIRED)
|
||||
|
||||
- If you want the header-only form of LLFIO:
|
||||
target_link_libraries(main PUBLIC llfio::hl)
|
||||
|
||||
- If you want the shared library form of LLFIO with shared NT kernel error code category:
|
||||
target_link_libraries(main PUBLIC llfio::dl llfio::ntkernel-error-category::dl)
|
9
ports/llfio/usage-error-code-static
Normal file
9
ports/llfio/usage-error-code-static
Normal file
@ -0,0 +1,9 @@
|
||||
The package llfio provides two CMake targets:
|
||||
|
||||
find_package(llfio CONFIG REQUIRED)
|
||||
|
||||
- If you want the header-only form of LLFIO:
|
||||
target_link_libraries(main PUBLIC llfio::hl)
|
||||
|
||||
- If you want the static library form of LLFIO with static NT kernel error code category:
|
||||
target_link_libraries(main PUBLIC llfio::sl llfio::ntkernel-error-category::sl)
|
9
ports/llfio/usage-status-code-dynamic
Normal file
9
ports/llfio/usage-status-code-dynamic
Normal file
@ -0,0 +1,9 @@
|
||||
The package llfio provides two CMake targets:
|
||||
|
||||
find_package(llfio CONFIG REQUIRED)
|
||||
|
||||
- If you want the header-only form of LLFIO:
|
||||
target_link_libraries(main PUBLIC llfio::hl)
|
||||
|
||||
- If you want the shared library form of LLFIO:
|
||||
target_link_libraries(main PUBLIC llfio::dl)
|
9
ports/llfio/usage-status-code-static
Normal file
9
ports/llfio/usage-status-code-static
Normal file
@ -0,0 +1,9 @@
|
||||
The package llfio provides two CMake targets:
|
||||
|
||||
find_package(llfio CONFIG REQUIRED)
|
||||
|
||||
- If you want the header-only form of LLFIO:
|
||||
target_link_libraries(main PUBLIC llfio::hl)
|
||||
|
||||
- If you want the static library form of LLFIO:
|
||||
target_link_libraries(main PUBLIC llfio::sl)
|
5
ports/ned14-internal-quickcpplib/CONTROL
Normal file
5
ports/ned14-internal-quickcpplib/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: ned14-internal-quickcpplib
|
||||
Version: 0.0.0-24d92c71
|
||||
Homepage: https://github.com/ned14/quickcpplib
|
||||
Description: NOT FOR EXTERNAL CONSUMPTION, a set of internal scripts used by ned14's libraries.
|
||||
Build-Depends: byte-lite, gsl-lite
|
74
ports/ned14-internal-quickcpplib/portfile.cmake
Normal file
74
ports/ned14-internal-quickcpplib/portfile.cmake
Normal file
@ -0,0 +1,74 @@
|
||||
# QuickCppLib is composed of other third party libraries:
|
||||
# <= quickcpplib
|
||||
# <= byte-lite
|
||||
# <= gsl-lite
|
||||
# <= Optional
|
||||
#
|
||||
# byte-lite and gsl-lite are in vcpkg, but may not be versions
|
||||
# known to be compatible with QuickCppLib. It has occurred in the
|
||||
# past that newer versions were severely broken with QuickCppLib.
|
||||
|
||||
include(${CURRENT_PORT_DIR}/sha_manifest.cmake)
|
||||
|
||||
message(WARNING [=[
|
||||
QuickCppLib and its downstream dependencies Outcome and LLFIO were tested against gsl-lite version 0.37.0 and byte-lite version 0.2.0. They are not guaranteed to work with newer versions, with failures experienced in the past up-to-and-including runtime crashes. You can pin the versions as verified to work in QuickCppLib's CI in your manifest file by adding:
|
||||
"overrides": [
|
||||
{ "name": "gsl-lite", "version": "0.37.0" },
|
||||
{ "name": "byte-lite", "version": "0.2.0" }
|
||||
]
|
||||
Do not report issues to upstream without first pinning these previous versions.
|
||||
]=])
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ned14/quickcpplib
|
||||
REF ${QUICKCPPLIB_REF}
|
||||
SHA512 ${QUICKCPPLIB_SHA512}
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
quicklib-depheaders.patch
|
||||
)
|
||||
|
||||
# Quickcpplib deploys subsets of the dependency headers into a private subdirectory
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/nonstd/byte.hpp"
|
||||
DESTINATION "${SOURCE_PATH}/include/quickcpplib/byte/include/nonstd")
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl/gsl-lite.hpp"
|
||||
DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl")
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/gsl-lite/gsl-lite.hpp"
|
||||
DESTINATION "${SOURCE_PATH}/include/quickcpplib/gsl-lite/include/gsl-lite")
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH OPT_SOURCE_PATH
|
||||
REPO akrzemi1/Optional
|
||||
REF ${OPTIONAL_REF}
|
||||
SHA512 ${OPTIONAL_SHA512}
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
file(COPY "${OPT_SOURCE_PATH}/." DESTINATION "${SOURCE_PATH}/include/quickcpplib/optional")
|
||||
|
||||
# Because quickcpplib's deployed files are header-only, the debug build it not necessary
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
|
||||
# Use QuickCppLib's own build process, skipping examples and tests.
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DPROJECT_IS_DEPENDENCY=On
|
||||
-DQUICKCPPLIB_USE_VCPKG_BYTE_LITE=ON
|
||||
-DQUICKCPPLIB_USE_VCPKG_GSL_LITE=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/quickcpplib)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/cmakelib" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/cmakelib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/share/scripts" "${CURRENT_PACKAGES_DIR}/share/ned14-internal-quickcpplib/scripts")
|
||||
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
29
ports/ned14-internal-quickcpplib/quicklib-depheaders.patch
Normal file
29
ports/ned14-internal-quickcpplib/quicklib-depheaders.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff --git a/cmake/headers.cmake b/cmake/headers.cmake
|
||||
index 1aad359..e5053ed 100644
|
||||
--- a/cmake/headers.cmake
|
||||
+++ b/cmake/headers.cmake
|
||||
@@ -13,8 +13,6 @@ set(quickcpplib_HEADERS
|
||||
"include/quickcpplib/boost/test/unit_test.hpp"
|
||||
"include/quickcpplib/byte.hpp"
|
||||
"include/quickcpplib/byte/include/nonstd/byte.hpp"
|
||||
- "include/quickcpplib/byte/test/byte-main.t.hpp"
|
||||
- "include/quickcpplib/byte/test/lest_cpp03.hpp"
|
||||
"include/quickcpplib/config.hpp"
|
||||
"include/quickcpplib/console_colours.hpp"
|
||||
"include/quickcpplib/cpp_feature.h"
|
||||
@@ -25,15 +23,8 @@ set(quickcpplib_HEADERS
|
||||
"include/quickcpplib/erasure_cast.hpp"
|
||||
"include/quickcpplib/execinfo_win64.h"
|
||||
"include/quickcpplib/function_ptr.hpp"
|
||||
- "include/quickcpplib/gsl-lite/gsl-lite.natvis"
|
||||
"include/quickcpplib/gsl-lite/include/gsl-lite/gsl-lite.hpp"
|
||||
- "include/quickcpplib/gsl-lite/include/gsl.h"
|
||||
- "include/quickcpplib/gsl-lite/include/gsl.hpp"
|
||||
- "include/quickcpplib/gsl-lite/include/gsl/gsl-lite-vc6.hpp"
|
||||
- "include/quickcpplib/gsl-lite/include/gsl/gsl-lite.h"
|
||||
"include/quickcpplib/gsl-lite/include/gsl/gsl-lite.hpp"
|
||||
- "include/quickcpplib/gsl-lite/test/gsl-lite.t.hpp"
|
||||
- "include/quickcpplib/gsl-lite/test/lest_cpp03.hpp"
|
||||
"include/quickcpplib/import.h"
|
||||
"include/quickcpplib/in_place_detach_attach.hpp"
|
||||
"include/quickcpplib/mem_flush_loads_stores.hpp"
|
5
ports/ned14-internal-quickcpplib/sha_manifest.cmake
Normal file
5
ports/ned14-internal-quickcpplib/sha_manifest.cmake
Normal file
@ -0,0 +1,5 @@
|
||||
set(QUICKCPPLIB_REF 24d92c71ef5d2200f7e42bc47e6dd59ad6d99fe3)
|
||||
set(QUICKCPPLIB_SHA512 9e39237833dea8288fbc5fda4189d971dff76284e3f352c7a0762e71a4bf311f4550fefd0f8926b6d971ca1c62acc3d055af233912de0adb0c6821995b6ce7e7)
|
||||
|
||||
set(OPTIONAL_REF 2b43315458a99fc5de1da6e7bc0ddd364b26d643)
|
||||
set(OPTIONAL_SHA512 1952386cd3c7b963861f9634055e1baa4181d398d6f1b068a8a3f411368432bdcd42e47aadfa856584ed9a7c724a1c83369243ccb653e650af5c9155b42a84f4)
|
2
ports/ned14-internal-quickcpplib/usage
Normal file
2
ports/ned14-internal-quickcpplib/usage
Normal file
@ -0,0 +1,2 @@
|
||||
You should NOT DIRECTLY USE quickcpplib in your own libraries!
|
||||
It is intended for internal use by ned14's vcpkg libraries only.
|
@ -1,4 +1,9 @@
|
||||
Source: outcome
|
||||
Version: 2.1.3
|
||||
Version: 2.2.0-b9e664fb
|
||||
Homepage: https://github.com/ned14/outcome
|
||||
Description: Provides very lightweight outcome<T> and result<T> (non-Boost edition)
|
||||
Build-Depends: ned14-internal-quickcpplib, status-code
|
||||
Supports: !uwp
|
||||
|
||||
Feature: run-tests
|
||||
Description: Build and run the dependency validation tests
|
||||
|
12
ports/outcome/outcome-prune-sources.patch
Normal file
12
ports/outcome/outcome-prune-sources.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git "a/cmake/headers.cmake" "b/cmake/headers.cmake"
|
||||
index 108038d16..bf4807e16 100644
|
||||
--- "a/cmake/headers.cmake"
|
||||
+++ "b/cmake/headers.cmake"
|
||||
@@ -47,7 +47,6 @@ set(outcome_HEADERS
|
||||
"include/outcome/experimental/status-code/include/system_code_from_exception.hpp"
|
||||
"include/outcome/experimental/status-code/include/system_error2.hpp"
|
||||
"include/outcome/experimental/status-code/include/win32_code.hpp"
|
||||
- "include/outcome/experimental/status-code/single-header/system_error2.hpp"
|
||||
"include/outcome/experimental/status_outcome.hpp"
|
||||
"include/outcome/experimental/status_result.hpp"
|
||||
"include/outcome/iostream_support.hpp"
|
@ -1,13 +1,77 @@
|
||||
# header-only library
|
||||
# Outcome is composed of other third party libraries:
|
||||
# Outcome
|
||||
# <= status-code
|
||||
# <= quickcpplib
|
||||
# <= byte-lite
|
||||
# <= gsl-lite
|
||||
# <= Optional
|
||||
#
|
||||
# byte-lite and gsl-lite are in vcpkg, but may not be versions
|
||||
# known to be compatible with Outcome. It has occurred in the
|
||||
# past that newer versions were severely broken with Outcome.
|
||||
#
|
||||
# One can fetch an 'all sources' tarball from
|
||||
# https://github.com/ned14/outcome/releases which contains
|
||||
# the exact copy of those third party libraries known to
|
||||
# have passed Outcome's CI process.
|
||||
|
||||
message(WARNING [=[
|
||||
Outcome depends on QuickCppLib which uses the vcpkg versions of gsl-lite and byte-lite, rather than the versions tested by QuickCppLib's and Outcome's CI. It is not guaranteed to work with other versions, with failures experienced in the past up-to-and-including runtime crashes. See the warning message from QuickCppLib for how you can pin the versions of those dependencies in your manifest file to those with which QuickCppLib was tested. Do not report issues to upstream without first pinning the versions as QuickCppLib was tested against.
|
||||
]=])
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ned14/outcome
|
||||
REF 34f3bd55e2bcaf246cb79efe64a5600e89b91b66 #v2.1.3
|
||||
SHA512 83eba50e2095e7c768dacb3af5f82db117c3451f1d5bc2f73d716608d56f7b73006ec33d0f3842fdefd076f0e82b72ece5777868712f75e83eac93aa8adf351c
|
||||
REF all_tests_passed_b9e664fbf87a4122731f7f19590abad24f1448b8
|
||||
SHA512 50666de7c6fed8260780a3bbd97eb8c8a27cf02541f15a19c316ddef30eafce155817ea8d77efee0180dbd07ad5da06a888275c324a554e25d5ce6bb80666071
|
||||
HEAD_REF develop
|
||||
PATCHES
|
||||
outcome-prune-sources.patch
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE OUTCOME_HEADERS "${SOURCE_PATH}/single-header/*.hpp")
|
||||
file(INSTALL ${OUTCOME_HEADERS} DESTINATION ${CURRENT_PACKAGES_DIR}/include)
|
||||
# Outcome needs a copy of QuickCppLib with which to bootstrap its cmake
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/quickcpplib"
|
||||
DESTINATION "${SOURCE_PATH}/quickcpplib/repo/include/"
|
||||
)
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/share/ned14-internal-quickcpplib/"
|
||||
DESTINATION "${SOURCE_PATH}/quickcpplib/repo/"
|
||||
)
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/Licence.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
# Outcome expects status-code to live inside its include directory
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/status-code/"
|
||||
DESTINATION "${SOURCE_PATH}/include/outcome/experimental/status-code/include/"
|
||||
)
|
||||
file(COPY "${CURRENT_INSTALLED_DIR}/include/status-code/detail/"
|
||||
DESTINATION "${SOURCE_PATH}/include/outcome/experimental/status-code/include/detail/"
|
||||
)
|
||||
|
||||
# Because outcome's deployed files are header-only, the debug build is not necessary
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
|
||||
# Already installed dependencies don't appear on the include path, which Outcome assumes.
|
||||
string(APPEND VCPKG_CXX_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"")
|
||||
string(APPEND VCPKG_C_FLAGS " \"-I${CURRENT_INSTALLED_DIR}/include\"")
|
||||
|
||||
# Use Outcome's own build process, skipping examples and tests.
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DPROJECT_IS_DEPENDENCY=On
|
||||
-Dquickcpplib_FOUND=1
|
||||
-DOUTCOME_ENABLE_DEPENDENCY_SMOKE_TEST=ON # Leave this always on to test everything compiles
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Git=ON
|
||||
)
|
||||
|
||||
if("run-tests" IN_LIST FEATURES)
|
||||
vcpkg_build_cmake(TARGET test)
|
||||
endif()
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/outcome)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
|
||||
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
4
ports/outcome/usage
Normal file
4
ports/outcome/usage
Normal file
@ -0,0 +1,4 @@
|
||||
The package outcome provides CMake targets:
|
||||
|
||||
find_package(outcome CONFIG REQUIRED)
|
||||
target_link_libraries(main PUBLIC outcome::hl)
|
4
ports/status-code/CONTROL
Normal file
4
ports/status-code/CONTROL
Normal file
@ -0,0 +1,4 @@
|
||||
Source: status-code
|
||||
Version: 1.0.0-ab3cd821
|
||||
Homepage: https://github.com/ned14/status-code
|
||||
Description: Proposed SG14 status_code for the C++ standard (https://wg21.link/P1028).
|
29
ports/status-code/portfile.cmake
Normal file
29
ports/status-code/portfile.cmake
Normal file
@ -0,0 +1,29 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO ned14/status-code
|
||||
REF ab3cd8217b6a89b91708a497f77f119c096fcce3
|
||||
SHA512 266c79875fd6edb4a239768da29401193d5b710fe3d06208df010c5ca56bf80fa4558f572c738ab9290ee378437c882d072e93e8fb10fb1e3787b460f40a7102
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
# Because status-code's deployed files are header-only, the debug build is not necessary
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DPROJECT_IS_DEPENDENCY=On
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/status-code)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/include" "${CURRENT_PACKAGES_DIR}/include2")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/include")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/include2" "${CURRENT_PACKAGES_DIR}/include/status-code")
|
||||
|
||||
file(INSTALL "${CURRENT_PORT_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/Licence.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
4
ports/status-code/usage
Normal file
4
ports/status-code/usage
Normal file
@ -0,0 +1,4 @@
|
||||
The package status-code provides CMake targets:
|
||||
|
||||
find_package(status-code CONFIG REQUIRED)
|
||||
target_link_libraries(main PUBLIC status-code::hl)
|
5
scripts/test_ports/llfio-run-tests/CONTROL
Normal file
5
scripts/test_ports/llfio-run-tests/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: llfio-run-tests
|
||||
Version: 0
|
||||
Description: Ensures that LLFIO built with vcpkg version of dependencies produces working executables.
|
||||
Build-Depends: llfio[run-tests], llfio[status-code,run-tests]
|
||||
Supports: x64
|
1
scripts/test_ports/llfio-run-tests/portfile.cmake
Normal file
1
scripts/test_ports/llfio-run-tests/portfile.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
5
scripts/test_ports/outcome-run-tests/CONTROL
Normal file
5
scripts/test_ports/outcome-run-tests/CONTROL
Normal file
@ -0,0 +1,5 @@
|
||||
Source: outcome-run-tests
|
||||
Version: 0
|
||||
Description: Ensures that outcome built with vcpkg version of dependencies produces working executables.
|
||||
Build-Depends: outcome[run-tests]
|
||||
Supports: x64
|
1
scripts/test_ports/outcome-run-tests/portfile.cmake
Normal file
1
scripts/test_ports/outcome-run-tests/portfile.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
|
@ -3664,6 +3664,10 @@
|
||||
"baseline": "latest-1",
|
||||
"port-version": 0
|
||||
},
|
||||
"llfio": {
|
||||
"baseline": "2.0-a74411ed",
|
||||
"port-version": 0
|
||||
},
|
||||
"llgl": {
|
||||
"baseline": "2019-08-15",
|
||||
"port-version": 1
|
||||
@ -4140,6 +4144,10 @@
|
||||
"baseline": "0.2.2",
|
||||
"port-version": 0
|
||||
},
|
||||
"ned14-internal-quickcpplib": {
|
||||
"baseline": "0.0.0-24d92c71",
|
||||
"port-version": 0
|
||||
},
|
||||
"netcdf-c": {
|
||||
"baseline": "4.7.4",
|
||||
"port-version": 2
|
||||
@ -4537,7 +4545,7 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"outcome": {
|
||||
"baseline": "2.1.3",
|
||||
"baseline": "2.2.0-b9e664fb",
|
||||
"port-version": 0
|
||||
},
|
||||
"p-ranav-csv": {
|
||||
@ -5716,6 +5724,10 @@
|
||||
"baseline": "0.6.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"status-code": {
|
||||
"baseline": "1.0.0-ab3cd821",
|
||||
"port-version": 0
|
||||
},
|
||||
"status-value-lite": {
|
||||
"baseline": "1.1.0",
|
||||
"port-version": 0
|
||||
|
9
versions/l-/llfio.json
Normal file
9
versions/l-/llfio.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "debab55b24a36f3615bd29f0fe3088032bd61e53",
|
||||
"version-string": "2.0-a74411ed",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
9
versions/n-/ned14-internal-quickcpplib.json
Normal file
9
versions/n-/ned14-internal-quickcpplib.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d71cb92f85e0f089d1d2f4161be4f08be9de26d1",
|
||||
"version-string": "0.0.0-24d92c71",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "77cd889f0b2157b6ae77982c30c8e17355d95245",
|
||||
"version-string": "2.2.0-b9e664fb",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "33dc2e0d31074248a2313ff2eeecad075206d9bb",
|
||||
"version-string": "2.1.3",
|
||||
|
9
versions/s-/status-code.json
Normal file
9
versions/s-/status-code.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "a140621d67b58b39b6f3ab49cc0c4f1456e5a29f",
|
||||
"version-string": "1.0.0-ab3cd821",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user