Cleanup import of TBB in CMake.

- Update FindSuiteSparse to use FindTBB.cmake to find TBB.
- Fix logic handling of TBB=ON if TBB is not found to continue with
  build after disabling TBB rather than throwing a fatal error.
- Use TBB_LIBRARIES instead of TBB_tbb_LIBRARY as a Ceres dependency,
  the former also includes the TBB malloc library.
- Add warning message about GPL licensing if TBB version < 2017.
- Add ‘TBB’ & ‘Mulithreading’ component options to find_package(Ceres),
  where ‘Mulithreading’ is equivalent to ‘TBB’ || ‘OpenMP’.

Change-Id: Ifc7f1d01b050ba6e2097ad1913b178805df4769a
This commit is contained in:
Alex Stewart
2017-11-26 15:05:02 +00:00
parent aab0193c7b
commit 488d401ac3
5 changed files with 27 additions and 26 deletions
+3 -1
View File
@@ -83,7 +83,9 @@ function(ceres_compile_options_to_components CURRENT_CERES_COMPILE_OPTIONS CERES
add_to_output_if_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}
CERES_USE_CXX11 "C++11")
add_to_output_if_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}
CERES_USE_OPENMP "OpenMP")
CERES_USE_OPENMP "OpenMP;Multithreading")
add_to_output_if_found(CURRENT_CERES_COMPILE_OPTIONS ${CERES_COMPONENTS_VAR}
CERES_USE_TBB "TBB;Multithreading")
# Remove duplicates of SparseLinearAlgebraLibrary if multiple sparse backends
# are present.
list(REMOVE_DUPLICATES ${CERES_COMPONENTS_VAR})