From 38d6712d5644ede4ff597e889549f5d540dcf8ff Mon Sep 17 00:00:00 2001 From: Rayan Date: Sat, 4 Sep 2021 08:01:51 +0800 Subject: [catch2] Guard build type for Catch2 (#19793) * guard build type for catch2 * update port-version * update baseline & version --- ports/catch2/portfile.cmake | 13 ++++++++----- ports/catch2/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/c-/catch2.json | 5 +++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ports/catch2/portfile.cmake b/ports/catch2/portfile.cmake index b157b48cd..140e1cba1 100644 --- a/ports/catch2/portfile.cmake +++ b/ports/catch2/portfile.cmake @@ -18,11 +18,14 @@ vcpkg_cmake_configure( ) vcpkg_cmake_install() - -file(RENAME "${CURRENT_PACKAGES_DIR}/share/Catch2" "${CURRENT_PACKAGES_DIR}/share/catch2_") -file(RENAME "${CURRENT_PACKAGES_DIR}/share/catch2_" "${CURRENT_PACKAGES_DIR}/share/catch2") -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") +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_fixup_pkgconfig() diff --git a/ports/catch2/vcpkg.json b/ports/catch2/vcpkg.json index dc2af5075..83dd9ff3d 100644 --- a/ports/catch2/vcpkg.json +++ b/ports/catch2/vcpkg.json @@ -1,6 +1,7 @@ { "name": "catch2", "version-semver": "2.13.7", + "port-version": 1, "description": "A modern, header-only test framework for unit testing.", "homepage": "https://github.com/catchorg/Catch2", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 3f19fa544..7dbea8563 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -1166,7 +1166,7 @@ }, "catch2": { "baseline": "2.13.7", - "port-version": 0 + "port-version": 1 }, "cccapstone": { "baseline": "9b4128ee1153e78288a1b5433e2c06a0d47a4c4e-1", diff --git a/versions/c-/catch2.json b/versions/c-/catch2.json index 5986f9ef0..ff3158afe 100644 --- a/versions/c-/catch2.json +++ b/versions/c-/catch2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "4df380019e5c3a0e450798db43d9ce70906b7aad", + "version-semver": "2.13.7", + "port-version": 1 + }, { "git-tree": "900833643e0eb468d957b4c46f46ba6647e283ff", "version-semver": "2.13.7", -- cgit v1.2.3