From: Jean-Paul Pelteret Date: Sat, 21 Jul 2018 21:43:35 +0000 (+0200) Subject: Update configuration to detect new ADOL-C "feature" :-/ X-Git-Tag: v9.1.0-rc1~885^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a50c3c1bf2f2133ea1101311f2589e313a89a50;p=dealii.git Update configuration to detect new ADOL-C "feature" :-/ --- diff --git a/cmake/configure/configure_adolc.cmake b/cmake/configure/configure_adolc.cmake index b60d7557c0..6c2671e1be 100644 --- a/cmake/configure/configure_adolc.cmake +++ b/cmake/configure/configure_adolc.cmake @@ -118,6 +118,7 @@ ENDMACRO() MACRO(FEATURE_ADOLC_CONFIGURE_EXTERNAL) SET(DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING ${ADOLC_WITH_ADVANCED_BRANCHING}) SET(DEAL_II_ADOLC_WITH_ATRIG_ERF ${ADOLC_WITH_ATRIG_ERF}) + SET(DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING ${ADOLC_WITH_TAPELESS_REFCOUNTING}) SET(DEAL_II_ADOLC_WITH_BOOST_ALLOCATOR ${ADOLC_WITH_BOOST_ALLOCATOR}) SET(DEAL_II_EXPAND_ADOLC_TYPES "adouble; adtl::adouble") diff --git a/cmake/modules/FindADOLC.cmake b/cmake/modules/FindADOLC.cmake index 6023af8063..bcba6ffd2a 100644 --- a/cmake/modules/FindADOLC.cmake +++ b/cmake/modules/FindADOLC.cmake @@ -77,6 +77,18 @@ IF(EXISTS ${ADOLC_SETTINGS_H}) SET(ADOLC_WITH_ADVANCED_BRANCHING FALSE) ENDIF() + # + # Check whether ADOL-C is configured with tapeless number reference counting + # + FILE(STRINGS "${ADOLC_SETTINGS_H}" ADOLC_WITH_TAPELESS_REFCOUNTING_STRING + REGEX "#define USE_ADTL_REFCOUNTING 1" + ) + IF(NOT "${ADOLC_WITH_TAPELESS_REFCOUNTING_STRING}" STREQUAL "") + SET(ADOLC_WITH_TAPELESS_REFCOUNTING TRUE) + ELSE() + SET(ADOLC_WITH_TAPELESS_REFCOUNTING FALSE) + ENDIF() + # # Check whether ADOL-C is configured to use the Boost pool allocator # diff --git a/include/deal.II/base/config.h.in b/include/deal.II/base/config.h.in index 717ca8b897..1c67a62a51 100644 --- a/include/deal.II/base/config.h.in +++ b/include/deal.II/base/config.h.in @@ -145,6 +145,7 @@ /* cmake/modules/FindADOLC.cmake */ #cmakedefine DEAL_II_ADOLC_WITH_ATRIG_ERF #cmakedefine DEAL_II_ADOLC_WITH_ADVANCED_BRANCHING +#cmakedefine DEAL_II_ADOLC_WITH_TAPELESS_REFCOUNTING /* cmake/modules/FindARPACK.cmake */ #cmakedefine DEAL_II_ARPACK_WITH_PARPACK