From 5fe81e832d452969328f77eeb10b91bb7fbd2465 Mon Sep 17 00:00:00 2001 From: Ben Cumming <louncharf@gmail.com> Date: Fri, 16 Mar 2018 09:05:42 +0100 Subject: [PATCH] update tbb cmake to use check_git_submodule (#452) --- CMakeLists.txt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11f98abf..f8f4ac97 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,12 +66,10 @@ set(ARB_THREADING_MODEL "cthread" CACHE STRING "set the threading model, one of set_property(CACHE ARB_THREADING_MODEL PROPERTY STRINGS cthread tbb serial ) if(ARB_THREADING_MODEL MATCHES "tbb") - # TODO: update to use built-in support for detecting git submodules. - if(NOT EXISTS "${CMAKE_SOURCE_DIR}/tbb/.git") - message(FATAL_ERROR - "\nThe git submodule for tbb must be checked out to use TBB.\n" - " git submodule init\n" - " git submodule update\n") + include(GitSubmodule) # required for check_git_submodule + check_git_submodule(tbb "${CMAKE_SOURCE_DIR}/tbb") + if(NOT tbb_avail) + message(FATAL_ERROR "TBB git submodule required.") endif() # turn off proxy malloc library and test compilation -- GitLab