From 3832ae62f147fc0643386cfa7bcd2446e7eddcc4 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 26 May 2020 22:43:11 -0500 Subject: [PATCH] address review comments --- .../configure/configure_1_cpp_taskflow.cmake | 26 +++++++++++++++++++ .../macros/macro_deal_ii_package_handle.cmake | 5 +++- cmake/modules/FindCPP_TASKFLOW.cmake | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) diff --git a/cmake/configure/configure_1_cpp_taskflow.cmake b/cmake/configure/configure_1_cpp_taskflow.cmake index c16290664a..b7f6b42263 100644 --- a/cmake/configure/configure_1_cpp_taskflow.cmake +++ b/cmake/configure/configure_1_cpp_taskflow.cmake @@ -19,6 +19,32 @@ # +MACRO(FEATURE_CPP_TASKFLOW_FIND_EXTERNAL var) + FIND_PACKAGE(CPP_TASKFLOW) + + IF(CPP_TASKFLOW_FOUND) + SET(${var} TRUE) + ENDIF() + + IF(CPP_TASKFLOW_VERSION VERSION_LESS "2.4") + # Clear the previously determined version numbers to avoid confusion + SET(CPP_TASKFLOW_VERSION "bundled") + SET(CPP_TASKFLOW_VERSION_MAJOR "") + SET(CPP_TASKFLOW_VERSION_MINOR "") + + MESSAGE(STATUS + "The externally provided Cpp Taskflow library is older than version 2.4, " + "which cannot be used with deal.II." + ) + SET(CPP_TASKFLOW_ADDITIONAL_ERROR_STRING + "The externally provided Cpp Taskflow library is older than version\n" + "2.4, which is the oldest version compatible with deal.II." + ) + SET(${var} FALSE) + ENDIF() +ENDMACRO() + + MACRO(FEATURE_CPP_TASKFLOW_CONFIGURE_BUNDLED) LIST(APPEND CPP_TASKFLOW_BUNDLED_INCLUDE_DIRS ${CPP_TASKFLOW_FOLDER}/include) ENDMACRO() diff --git a/cmake/macros/macro_deal_ii_package_handle.cmake b/cmake/macros/macro_deal_ii_package_handle.cmake index d7c8ce851d..4c148eeab0 100644 --- a/cmake/macros/macro_deal_ii_package_handle.cmake +++ b/cmake/macros/macro_deal_ii_package_handle.cmake @@ -154,7 +154,10 @@ MACRO(DEAL_II_PACKAGE_HANDLE _feature _var) ENDFOREACH() # - # Remove certain system libraries from the link interface + # Remove certain system libraries from the link interface. This is + # purely cosmetic (we always implicitly link against the C library, and + # we always set up threading by linking against libpthread.so if + # necessary). # FOREACH(_suffix LIBRARIES LIBRARIES_DEBUG LIBRARIES_RELEASE) IF(NOT "${${_feature}_${_suffix}}" STREQUAL "") diff --git a/cmake/modules/FindCPP_TASKFLOW.cmake b/cmake/modules/FindCPP_TASKFLOW.cmake index 791a914a5d..6c486fd134 100644 --- a/cmake/modules/FindCPP_TASKFLOW.cmake +++ b/cmake/modules/FindCPP_TASKFLOW.cmake @@ -22,7 +22,7 @@ # CPP_TASKFLOW_VERSION # -SET(CPP_TASKFLOW_DIR "" CACHE PATH "An optional hint to a CPP CPP_TASKFLOW installation") +SET(CPP_TASKFLOW_DIR "" CACHE PATH "An optional hint to a Cpp Taskflow installation") SET_IF_EMPTY(CPP_TASKFLOW_DIR "$ENV{CPP_TASKFLOW_DIR}") FIND_PACKAGE(CPP_TASKFLOW_CONFIG -- 2.39.5