MACRO(FEATURE_BOOST_FIND_EXTERNAL var)
+ #
+ # This mumbo jumbo is necessary because CMake won't let us test against
+ # BOOST_DIR directly. WTF?!
+ #
IF(NOT DEFINED BOOST_DIR)
SET(BOOST_DIR "$ENV{BOOST_DIR}")
ELSE()
SET_IF_EMPTY(BOOST_DIR "$ENV{BOOST_DIR}")
ENDIF()
+
IF(NOT "${BOOST_DIR}" STREQUAL "")
SET(BOOST_ROOT "${BOOST_DIR}")
ENDIF()
#
# Fall back to dynamic libraries if no static libraries could be found:
#
- IF( Boost_USE_STATIC_LIBS AND
- (NOT Boost_SERIALIZATION_FOUND OR NOT Boost_SYSTEM_FOUND)
- )
+ IF(NOT Boost_FOUND AND Boost_USE_STATIC_LIBS)
SET(Boost_USE_STATIC_LIBS FALSE)
FIND_PACKAGE(Boost 1.44 COMPONENTS ${_boost_components})
ENDIF()
MARK_AS_ADVANCED(Boost_DIR)
-
- IF( Boost_SERIALIZATION_FOUND AND
- Boost_SYSTEM_FOUND AND
- (NOT DEAL_II_WITH_THREADS OR Boost_THREAD_FOUND) )
-
+ IF(Boost_FOUND)
SET(BOOST_VERSION_MAJOR "${Boost_MAJOR_VERSION}")
SET(BOOST_VERSION_MINOR "${Boost_MINOR_VERSION}")
SET(BOOST_VERSION_SUBMINOR "${Boost_SUBMINOR_VERSION}")
ELSE()
- SET(BOOST_DIR "" CACHE PATH
- "An optional hint to a boost directory"
- )
+ SET(BOOST_DIR "" CACHE PATH "An optional hint to a boost directory")
ENDIF()
ENDMACRO()
# We need to set some definitions to use the headers of the bundled boost
# library:
#
- LIST(APPEND DEAL_II_DEFINITIONS
- "BOOST_NO_HASH" "BOOST_NO_SLIST"
- )
- LIST(APPEND DEAL_II_USER_DEFINITIONS
- "BOOST_NO_HASH" "BOOST_NO_SLIST"
- )
+ LIST(APPEND DEAL_II_DEFINITIONS "BOOST_NO_HASH" "BOOST_NO_SLIST")
+ LIST(APPEND DEAL_II_USER_DEFINITIONS "BOOST_NO_HASH" "BOOST_NO_SLIST")
INCLUDE_DIRECTORIES(${BOOST_FOLDER}/include)
ENDMACRO()