Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
include("${CMAKE_CURRENT_LIST_DIR}/ctrackTargets.cmake")

if(NOT MSVC AND NOT CTRACK_DISABLE_EXECUTION_POLICY)
include(CMakeFindDependencyMacro)
find_dependency(TBB QUIET)
# Use plain find_package (not find_dependency!) so that TBB stays
# truly optional even when the consumer calls find_package(ctrack REQUIRED).
# find_dependency() would silently forward REQUIRED to this call and
# turn a missing TBB into a fatal configure error.
find_package(TBB QUIET)
if(NOT TBB_FOUND)
message(STATUS "TBB not found. Disabling parallel execution for ctrack.")
set(CTRACK_DISABLE_EXECUTION_POLICY ON)
Expand Down