From ea6dba0cd9b01b007c5463d0cdecce197b89fab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Sat, 21 Dec 2019 04:22:42 +0800 Subject: [PATCH] [tbb] Set fatal build tool requirements for UNIX (#9188) * [tbb]Stop building TBB when build tools are not found in UNIX, remove vcpkg_test_cmake. * [tbb]Re-fix message. --- ports/tbb/CONTROL | 2 +- ports/tbb/portfile.cmake | 13 +++++-------- ports/tbb/terminate-when-buildtool-notfound.patch | 13 +++++++++++++ 3 files changed, 19 insertions(+), 9 deletions(-) create mode 100644 ports/tbb/terminate-when-buildtool-notfound.patch diff --git a/ports/tbb/CONTROL b/ports/tbb/CONTROL index a519042618..5e5699f952 100644 --- a/ports/tbb/CONTROL +++ b/ports/tbb/CONTROL @@ -1,4 +1,4 @@ Source: tbb -Version: 2019_U8-2 +Version: 2019_U8-3 Homepage: https://github.com/01org/tbb Description: Intel's Threading Building Blocks. diff --git a/ports/tbb/portfile.cmake b/ports/tbb/portfile.cmake index 1d543b317e..faa7e2c707 100644 --- a/ports/tbb/portfile.cmake +++ b/ports/tbb/portfile.cmake @@ -1,12 +1,12 @@ -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO intel/tbb REF 4bdba61bafc6ba2d636f31564f1de5702d365cf7 SHA512 0b00c9deefdac5dc1f4fbae314e91eb3513b54b47ff6dec08ed2460486fc7d211ab36d6130e5787bfd50523cb613c65f03f9217d967292ca9056e2d3f5010bf8 HEAD_REF tbb_2019 - PATCHES fix-static-build.patch + PATCHES + fix-static-build.patch + terminate-when-buildtool-notfound.patch ) file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) @@ -115,9 +115,6 @@ string(REPLACE string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}") file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}") +file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) # Handle copyright -file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright) - -vcpkg_test_cmake(PACKAGE_NAME TBB) -# +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) diff --git a/ports/tbb/terminate-when-buildtool-notfound.patch b/ports/tbb/terminate-when-buildtool-notfound.patch new file mode 100644 index 0000000000..9599b48cd0 --- /dev/null +++ b/ports/tbb/terminate-when-buildtool-notfound.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/TBBBuild.cmake b/cmake/TBBBuild.cmake +index a2222e3..756d85c 100644 +--- a/cmake/TBBBuild.cmake ++++ b/cmake/TBBBuild.cmake +@@ -158,7 +158,7 @@ function(tbb_build) + mark_as_advanced(TBB_MAKE_TOOL) + + if (NOT TBB_MAKE_TOOL) +- message(STATUS "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found") ++ message(FATAL_ERROR "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found") + set(${tbb_build_CONFIG_DIR} ${tbb_build_CONFIG_DIR}-NOTFOUND PARENT_SCOPE) + return() + endif()