MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL)
ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}")
-
LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES})
-
CHECK_FOR_LAPACK_FUNCTIONS()
ENDMACRO()
MACRO(FEATURE_BOOST_CONFIGURE_EXTERNAL)
- INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES (${Boost_INCLUDE_DIRS})
+
+ #
+ # Transform Boost_LIBRARIES into a list of debug and release libraries
+ # without keywords:
+ #
+ SPLIT_DEBUG_RELEASE(_boost_debug _boost_release ${Boost_LIBRARIES})
IF (CMAKE_BUILD_TYPE MATCHES "Debug")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG
- ${Boost_SERIALIZATION_LIBRARY_DEBUG}
- ${Boost_SYSTEM_LIBRARY_DEBUG}
- ${Boost_THREAD_LIBRARY_DEBUG}
- )
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${_boost_debug})
ENDIF()
IF (CMAKE_BUILD_TYPE MATCHES "Release")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE
- ${Boost_SERIALIZATION_LIBRARY_RELEASE}
- ${Boost_SYSTEM_LIBRARY_RELEASE}
- ${Boost_THREAD_LIBRARY_RELEASE}
- )
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${_boost_release})
ENDIF()
ENDMACRO()
--- /dev/null
+#####
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## <TODO: Full License information>
+## This file is dual licensed under QPL 1.0 and LGPL 2.1 or any later
+## version of the LGPL license.
+##
+## Author: Matthias Maier <matthias.maier@iwr.uni-heidelberg.de>
+##
+#####
+
+
+#
+# A small macro to split a list of libraries with debug, optimized and
+# general keywords into two lists consisting of all libraries necessary for
+# the debug and release target only. If no keyword is given "optimized" is
+# assumed.
+#
+# Usage:
+# SPLIT_DEBUG_RELEASE(list_debug list_release <...list of libraries...>)
+#
+#
+
+MACRO(SPLIT_DEBUG_RELEASE _list_debug _list_release)
+
+ SET(_toggle "optimized")
+ FOREACH(_tmp ${ARGN})
+ IF("${_tmp}" STREQUAL "debug" OR
+ "${_tmp}" STREQUAL "optimized" OR
+ "${_tmp}" STREQUAL "general")
+ SET(_toggle "${_tmp}")
+ ELSE()
+ IF("${_toggle}" STREQUAL "general")
+ LIST(APPEND ${_list_debug} "${_tmp}")
+ LIST(APPEND ${_list_release} "${_tmp}")
+ ELSEIF("${_toggle}" STREQUAL "debug")
+ LIST(APPEND ${_list_debug} "${_tmp}")
+ ELSEIF("${_toggle}" STREQUAL "optimized")
+ LIST(APPEND ${_list_release} "${_tmp}")
+ ENDIF()
+ ENDIF()
+ ENDFOREACH()
+
+ IF("${${_list_debug}}" STREQUAL "")
+ SET(${_list_debug} ${${_list_release}})
+ ELSEIF("${${_list_release}}" STREQUAL "")
+ SET(${_list_release} ${${_list_debug}})
+ ENDIF()
+
+ENDMACRO()
#
# Boost is a mandatory build time dependency.
#
-# TODO
+# Automatic detection:
+#
+# SET(Boost_DIR "..." CACHE PATH
+# "The preferred installation prefix for searching for boost"
+# )
+#
+# Have a look at the very long configuration list in FindBoost.cmake.
+#
+# Manual setup:
+#
+# SET(Boost_FOUND TRUE CACHE BOOL "")
+# SET(Boost_INCLUDE_DIRS "semicolon;separated;list;of;include;dirs" CACHE STRING "")
+# SET(Boost_LIBRARIES "libraries;and;semicolon;separated;list;of;link;interface" CACHE STRING "")
#
#
# SET(MPI_CXX_LIBRARIES "library;and;semicolon;separated;list;of;link;interface" CACHE STRING "")
# SET(MPI_CXX_INCLUDE_PATH "include directory for mpi" CACHE STRING "")
-# SET(MPI_CXX_FLAGS "..." CACHE STRING "")
+# SET(MPI_CXX_COMPILE_FLAGS "..." CACHE STRING "")
# SET(MPI_CXX_LINK_FLAGS "..." CACHE STRING "")
#