Fix repeated calls to FindTBB in module mode.

fixes #6355
This commit is contained in:
tamasmeszaros authored and Lane.Wei committed 2022-12-16 22:51:07 -05:00
1 parent d472eb7afb
commit 69edbdd01f
1 file changed
+1 -1
+1 -1
View File
@@ -293,7 +293,7 @@ if(NOT TBB_FOUND)
# Create targets
##################################
if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND)
if(NOT CMAKE_VERSION VERSION_LESS 3.0 AND TBB_FOUND AND NOT TARGET TBB::tbb)
add_library(TBB::tbb UNKNOWN IMPORTED)
set_target_properties(TBB::tbb PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "${TBB_DEFINITIONS}"