From 4a387a4fd74b843a6a08da3ccfdb0ba223afa208 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 30 Jan 2018 15:02:19 -0800 Subject: [PATCH] [boost-vcpkg-helpers] Fix generator script for boost-test modifications in PR #2672 --- ports/boost-vcpkg-helpers/generate-ports.ps1 | 26 ++++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/ports/boost-vcpkg-helpers/generate-ports.ps1 b/ports/boost-vcpkg-helpers/generate-ports.ps1 index 0b186caa4..a688f2356 100644 --- a/ports/boost-vcpkg-helpers/generate-ports.ps1 +++ b/ports/boost-vcpkg-helpers/generate-ports.ps1 @@ -22,11 +22,16 @@ function Generate() $sanitizedName = $name -replace "_","-" $versionsuffix = "" - if ($Name -eq "test" -or $Name -eq "python" -or $Name -eq "asio") + if ($Name -eq "python" -or $Name -eq "asio") { $versionsuffix = "-1" } + if ($Name -eq "test") + { + $versionsuffix = "-2" + } + mkdir "$scriptsDir/../boost-$sanitizedName" -erroraction SilentlyContinue | out-null $controlLines = @( "# Automatically generated by boost-vcpkg-helpers/generate-ports.ps1" @@ -158,15 +163,20 @@ function Generate() if ($Name -eq "test") { $portfileLines += @( - "file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/lib/manual-link)" - "file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + "if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL `"release`")" + " file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/lib/manual-link)" + " file(GLOB MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*)" + " file(COPY `${MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/lib/manual-link)" + " file(REMOVE `${MONITOR_LIBS})" + "endif()" "" - "file(GLOB MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/lib/*_exec_monitor*)" - "file(COPY `${MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/lib/manual-link)" - "file(GLOB DEBUG_MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*)" - "file(COPY `${DEBUG_MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + "if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL `"debug`")" + " file(MAKE_DIRECTORY `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + " file(GLOB DEBUG_MONITOR_LIBS `${CURRENT_PACKAGES_DIR}/debug/lib/*_exec_monitor*)" + " file(COPY `${DEBUG_MONITOR_LIBS} DESTINATION `${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)" + " file(REMOVE `${DEBUG_MONITOR_LIBS})" + "endif()" "" - "file(REMOVE `${DEBUG_MONITOR_LIBS} `${MONITOR_LIBS})" ) }