From 010ae257f21993b07de80575d32d4573626561cb Mon Sep 17 00:00:00 2001 From: Hans Johnson Date: Fri, 18 Jan 2019 15:01:30 -0600 Subject: [PATCH] BUG: Do not have a FATAL_ERROR from config checking The FATAL_ERROR causes the un-recoverable failure on testing. find_packaging(TBB QUIET) should be allowed to fail. If a component is missing that was requested, a non-terminating exit is needed. --- cmake/templates/TBBConfig.cmake.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/templates/TBBConfig.cmake.in b/cmake/templates/TBBConfig.cmake.in index 9094343cf8..326e6a181e 100644 --- a/cmake/templates/TBBConfig.cmake.in +++ b/cmake/templates/TBBConfig.cmake.in @@ -74,7 +74,12 @@ foreach (_tbb_component ${TBB_FIND_COMPONENTS}) list(APPEND TBB_IMPORTED_TARGETS TBB::${_tbb_component}) set(TBB_${_tbb_component}_FOUND 1) elseif (TBB_FIND_REQUIRED AND TBB_FIND_REQUIRED_${_tbb_component}) - message(FATAL_ERROR "Missed required Intel TBB component: ${_tbb_component}") + message(STATUS "Missed required Intel TBB component: ${_tbb_component}") + # Do not use FATAL_ERROR message as that + # breaks find_package(TBB QUIET) behavior + set(TBB_FOUND FALSE) # Set TBB_FOUND considered to be NOT FOUND if + # required components missing + set(TBB_${_tbb_component}_FOUND 0) endif() endforeach()