cmake: skip find_package(TBB) if already loaded
This commit is contained in:
parent
bac7559926
commit
dd3fc97811
@ -42,7 +42,11 @@ function(vtkm_extract_real_library library real_library)
|
||||
endfunction()
|
||||
|
||||
if(VTKm_ENABLE_TBB AND NOT TARGET vtkm::tbb)
|
||||
find_package(TBB REQUIRED)
|
||||
# Skip find_package(TBB) if we already have it
|
||||
if (NOT TARGET TBB::tbb)
|
||||
find_package(TBB REQUIRED)
|
||||
endif()
|
||||
|
||||
add_library(vtkmTBB INTERFACE)
|
||||
add_library(vtkm::tbb ALIAS vtkmTBB)
|
||||
target_link_libraries(vtkmTBB INTERFACE TBB::tbb)
|
||||
|
Loading…
Reference in New Issue
Block a user