Skip to content

Commit

Permalink
Merge pull request #5732 from janetournois/Polyhedron_demo-fix_cmakel…
Browse files Browse the repository at this point in the history
…ists_find_tbb-jtournois

FindTBB.cmake: only search TBB in Config mode if version >= 2019 update 5
  • Loading branch information
lrineau committed Jun 2, 2021
2 parents 5cbadbe + 321e829 commit b935f4d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Installation/cmake/modules/FindTBB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,20 @@ endmacro()
#=============================================================================
# Now to actually find TBB
#
#start with looking for TBB_DIR and TBB_ROOT
if((TBB_ROOT OR ENV{TBB_ROOT} OR ENV{TBB_DIR} ) AND NOT TBB_FOUND)
find_package(TBB QUIET NO_MODULE NO_CMAKE_SYSTEM_PATH NO_SYSTEM_ENVIRONMENT_PATH)
endif()
if(TBB_FOUND)
return()
endif()#TBB_FOUND

#start with CONFIG Mode
find_package(TBB QUIET NO_MODULE)
#try CONFIG Mode
find_package(TBB 2019.0.11005 QUIET NO_MODULE)
if(TBB_FOUND)
return()
endif()#TBB_FOUND

# Get path, convert backslashes as ${ENV_${var}}
getenv_path(TBB_ROOT)

Expand Down

0 comments on commit b935f4d

Please sign in to comment.