[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.
This commit is contained in:
Jack·Boos·Yu 2019-12-21 04:22:42 +08:00 committed by dan-shaw
parent 36c04f16de
commit ea6dba0cd9
3 changed files with 19 additions and 9 deletions

View File

@ -1,4 +1,4 @@
Source: tbb Source: tbb
Version: 2019_U8-2 Version: 2019_U8-3
Homepage: https://github.com/01org/tbb Homepage: https://github.com/01org/tbb
Description: Intel's Threading Building Blocks. Description: Intel's Threading Building Blocks.

View File

@ -1,12 +1,12 @@
include(vcpkg_common_functions)
vcpkg_from_github( vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH OUT_SOURCE_PATH SOURCE_PATH
REPO intel/tbb REPO intel/tbb
REF 4bdba61bafc6ba2d636f31564f1de5702d365cf7 REF 4bdba61bafc6ba2d636f31564f1de5702d365cf7
SHA512 0b00c9deefdac5dc1f4fbae314e91eb3513b54b47ff6dec08ed2460486fc7d211ab36d6130e5787bfd50523cb613c65f03f9217d967292ca9056e2d3f5010bf8 SHA512 0b00c9deefdac5dc1f4fbae314e91eb3513b54b47ff6dec08ed2460486fc7d211ab36d6130e5787bfd50523cb613c65f03f9217d967292ca9056e2d3f5010bf8
HEAD_REF tbb_2019 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}) 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}") string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_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 # Handle copyright
file(COPY ${SOURCE_PATH}/LICENSE ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb) file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/tbb/LICENSE ${CURRENT_PACKAGES_DIR}/share/tbb/copyright)
vcpkg_test_cmake(PACKAGE_NAME TBB)
#

View File

@ -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()