From 9e596cfb95795d2bf5123ca2f5ce12c2dbe80ac4 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Sun, 22 Sep 2019 20:32:54 -0400 Subject: [PATCH] Add more explanations --- cmake/configure/configure_2_boost.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/configure/configure_2_boost.cmake b/cmake/configure/configure_2_boost.cmake index aa78f31475..bb5640bfd8 100644 --- a/cmake/configure/configure_2_boost.cmake +++ b/cmake/configure/configure_2_boost.cmake @@ -63,8 +63,14 @@ MACRO(FEATURE_BOOST_CONFIGURE_COMMON) ELSE() ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Werror") ENDIF() + # The configure function is called only once. In case an externally provided + # boost library is detected, BOOST_INCLUDE_DIRS contains the include paths to + # be used and BOOST_BUNDLED_INCLUDE_DIRS is empty. For the bundled library, it + # is the other way around. LIST(APPEND CMAKE_REQUIRED_INCLUDES ${BOOST_INCLUDE_DIRS} ${BOOST_BUNDLED_INCLUDE_DIRS}) + # In case, the boost library already sets BOOST_NO_AUTO_PTR we report + # DEAL_II_HAS_AUTO_PTR to be true to avoid redefining the macro. CHECK_CXX_SOURCE_COMPILES( " #include @@ -104,6 +110,8 @@ MACRO(FEATURE_BOOST_CONFIGURE_BUNDLED) ENDIF() ENDIF() + # We need to set this path before calling the configure function + # to be able to use the include paths in the checks. SET(BOOST_BUNDLED_INCLUDE_DIRS ${BOOST_FOLDER}/include) FEATURE_BOOST_CONFIGURE_COMMON() -- 2.39.5