[catch2] Update to 3.0.1 (#24762)

* [catch2] Update to 3.0.1

* [catch2] Update version files

* [catch2] Move catch2main.lib to the manual-link folder

* [catch2] Update version files

* [catch2] Fix catch2main library path on every platform

* [catch2] Update version files
This commit is contained in:
Rémy Tassoux 2022-05-18 11:27:58 +02:00 committed by GitHub
parent c1b768b0d6
commit f594be6a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 43 additions and 36 deletions

View File

@ -1,17 +1,7 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0370ea3..7cef01a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -146,7 +146,7 @@ if (NOT_SUBPROJECT)
EXPORT
Catch2Targets
DESTINATION
- ${CMAKE_INSTALL_LIBDIR}
+ ${CMAKE_INSTALL_LIBDIR}/manual-link
)
@@ -226,7 +226,7 @@ if (NOT_SUBPROJECT)
@@ -168,7 +168,7 @@
## Provide some pkg-config integration
set(PKGCONFIG_INSTALL_DIR
@ -20,3 +10,28 @@ index 0370ea3..7cef01a 100644
CACHE PATH "Path where catch2.pc is installed"
)
configure_file(
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -335,12 +335,20 @@
install(
TARGETS
Catch2
- Catch2WithMain
EXPORT
Catch2Targets
DESTINATION
${CMAKE_INSTALL_LIBDIR}
)
+
+ install(
+ TARGETS
+ Catch2WithMain
+ EXPORT
+ Catch2Targets
+ DESTINATION
+ ${CMAKE_INSTALL_LIBDIR}/manual-link
+ )
install(

View File

@ -1,43 +1,31 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO catchorg/Catch2
REF 62fd660583d3ae7a7886930b413c3c570e89786c # v2.13.9
SHA512 70805a37183917bc1534899dec828f786bc5e60c5742364b700b02d4965aba6ac7d03d98218275c07854f963bf80bdf3f0f26f3c90d12882520b078638d5c703
REF v3.0.1
SHA512 065094c19cdf98b40f96a390e887542f895495562a91cdc28d68ce03690866d846ec87d320405312a2b97eacaa5351d3e55f0012bb9de40073c8d4444d82b0a1
HEAD_REF devel
PATCHES
PATCHES
fix-install-path.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DBUILD_TESTING=OFF
-DCATCH_BUILD_EXAMPLES=OFF
-DCATCH_INSTALL_DOCS=OFF
-DCATCH_BUILD_STATIC_LIBRARY=${BUILD_STATIC}
-DCATCH_INSTALL_EXTRAS=OFF
)
vcpkg_cmake_install()
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
file(RENAME "${CURRENT_PACKAGES_DIR}/share/Catch2" "${CURRENT_PACKAGES_DIR}/share/catch2_")
file(RENAME "${CURRENT_PACKAGES_DIR}/share/catch2_" "${CURRENT_PACKAGES_DIR}/share/catch2")
endif()
if (NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/Catch2" "${CURRENT_PACKAGES_DIR}/debug/share/catch2_")
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share/catch2_" "${CURRENT_PACKAGES_DIR}/debug/share/catch2")
endif()
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/Catch2")
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Catch2)
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
if(NOT EXISTS "${CURRENT_PACKAGES_DIR}/include/catch2/catch.hpp")
message(FATAL_ERROR "Main includes have moved. Please update the forwarder.")
endif()
# We remove these folders because they are empty and cause warnings on the library installation
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/catch2/benchmark/internal")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/catch2/generators/internal")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/catch.hpp" "#include <catch2/catch.hpp>")
file(WRITE "${CURRENT_PACKAGES_DIR}/include/catch.hpp" "#include <catch2/catch_all.hpp>")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,7 +1,6 @@
{
"name": "catch2",
"version-semver": "2.13.9",
"port-version": 1,
"version-semver": "3.0.1",
"description": "A modern, header-only test framework for unit testing.",
"homepage": "https://github.com/catchorg/Catch2",
"license": "BSL-1.0",

View File

@ -1273,8 +1273,8 @@
"port-version": 1
},
"catch2": {
"baseline": "2.13.9",
"port-version": 1
"baseline": "3.0.1",
"port-version": 0
},
"cccapstone": {
"baseline": "9b4128ee1153e78288a1b5433e2c06a0d47a4c4e",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "c0c872e7175f3ca20a15f5c8cc0d0c23e59e1ad1",
"version-semver": "3.0.1",
"port-version": 0
},
{
"git-tree": "ed81e9ef2d6ef2020605ec6ba1092a2ab631305a",
"version-semver": "2.13.9",