SET(CONFIG_LIBRARIES_${_build}
\${DEAL_II_PATH}/\${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${_build}}
- ${DEAL_II_EXTERNAL_LIBRARIES}
${DEAL_II_EXTERNAL_LIBRARIES_${_build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
)
LIST(APPEND CONFIG_LIBRARIES
${_keyword}
#
SET(_libs)
FOREACH(_lib
- ${DEAL_II_EXTERNAL_LIBRARIES}
${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
)
IF(_lib MATCHES "^/")
LIST(APPEND _libs "${_lib}")
SET(_paths)
FOREACH(_lib
$(D)/${DEAL_II_LIBRARY_RELDIR}/${CONFIG_LIBRARY_${build}}
- ${DEAL_II_EXTERNAL_LIBRARIES}
${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
)
LIST(APPEND MAKEFILE_LIBS_${build} ${_lib})
#
MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL)
ADD_FLAGS(DEAL_II_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${LAPACK_LIBRARIES})
CHECK_FOR_LAPACK_FUNCTIONS()
ENDMACRO()
ADD_FLAGS(CMAKE_CXX_FLAGS "${MPI_CXX_COMPILE_FLAGS}")
ADD_FLAGS(DEAL_II_LINKER_FLAGS "${MPI_CXX_LINK_FLAGS}")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MPI_CXX_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${MPI_CXX_LIBRARIES})
INCLUDE_DIRECTORIES(${MPI_CXX_INCLUDE_PATH})
# The user has to know the location of the mpi headers as well:
MACRO(FEATURE_THREADS_CONFIGURE_EXTERNAL)
INCLUDE_DIRECTORIES(${TBB_INCLUDE_DIR})
- SPLIT_DEBUG_RELEASE(_tbb_debug _tbb_release ${TBB_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${TBB_LIBRARIES})
IF(CMAKE_BUILD_TYPE MATCHES "Debug")
IF(TBB_WITH_DEBUG_LIB)
)
ENDIF()
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${_tbb_debug})
ENDIF()
- IF(CMAKE_BUILD_TYPE MATCHES "Release")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${_tbb_release})
- ENDIF()
SETUP_THREADING()
ENDMACRO()
FIND_LIBRARY(dl_LIBRARY NAMES dl)
MARK_AS_ADVANCED(dl_LIBRARY)
IF(NOT dl_LIBRARY MATCHES "-NOTFOUND")
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${dl_LIBRARY})
+ DEAL_II_APPEND_LIBRARIES(${dl_LIBRARY})
ENDIF()
INCLUDE_DIRECTORIES(${TBB_FOLDER}/include)
# The user has to know the location of the petsc headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${PETSC_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${PETSC_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${PETSC_LIBRARIES})
#
# Disable a bunch of warnings when compiling with petsc:
# The user has to know the location of the trilinos headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${TRILINOS_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${TRILINOS_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${TRILINOS_LIBRARIES})
SET(DEAL_II_EXPAND_TRILINOS_VECTOR "TrilinosWrappers::Vector")
SET(DEAL_II_EXPAND_TRILINOS_BLOCKVECTOR "TrilinosWrappers::BlockVector")
IF(NOT FEATURE_THREADS_PROCESSED)
MESSAGE(FATAL_ERROR "\n"
"Internal build system error:\n"
- "configure_boost.cmake included before configure_tbb.cmake\n\n"
+ "configure_boost.cmake included before configure_1_threads.cmake\n\n"
)
ENDIF()
#
LIST(REMOVE_ITEM Boost_LIBRARIES "pthread")
- #
- # Transform Boost_LIBRARIES into a list of debug and release libraries
- # without keywords:
- #
- SPLIT_DEBUG_RELEASE(_boost_debug _boost_release ${Boost_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${Boost_LIBRARIES})
- IF (CMAKE_BUILD_TYPE MATCHES "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_release})
- ENDIF()
ENDMACRO()
# The user has to know the location of the MUMPS headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${MUMPS_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${MUMPS_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${MUMPS_LIBRARIES})
ENDMACRO()
CONFIGURE_FEATURE(MUMPS)
# The user has to know the location of the P4EST headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${P4EST_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${P4EST_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${P4EST_LIBRARIES})
ENDMACRO()
CONFIGURE_FEATURE(P4EST)
# The user has to know the location of the SLEPC headers as well:
LIST(APPEND DEAL_II_USER_INCLUDE_DIRS ${SLEPC_INCLUDE_DIRS})
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${SLEPC_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${SLEPC_LIBRARIES})
ENDMACRO()
INCLUDE_DIRECTORIES(${${_feature}_INCLUDE_DIRS})
ENDIF()
IF(DEFINED ${_feature}_LIBRARIES)
- LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${${_feature}_LIBRARIES})
+ DEAL_II_APPEND_LIBRARIES(${${_feature}_LIBRARIES})
ENDIF()
IF(DEFINED ${_feature}_LINKER_FLAGS)
ADD_FLAGS(DEAL_II_LINKER_FLAGS "${${_feature}_LINKER_FLAGS}")
--- /dev/null
+## ---------------------------------------------------------------------
+## $Id$
+##
+## Copyright (C) 2013 by the deal.II authors
+##
+## This file is part of the deal.II library.
+##
+## The deal.II library is free software; you can use it, redistribute
+## it, and/or modify it under the terms of the GNU Lesser General
+## Public License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+## The full text of the license can be found in the file LICENSE at
+## the top level of the deal.II distribution.
+##
+## ---------------------------------------------------------------------
+
+#
+# A small macro to add libraries to
+# DEAL_II_EXTERNAL_LIBRARIES
+# DEAL_II_EXTERNAL_LIBRARIES_DEBUG
+# DEAL_II_EXTERNAL_LIBRARIES_RELEASE
+# depending on the "optmized", "debug" or "general" keyword
+#
+# Usage:
+# DEAL_II_APPEND_LIBRARIES(<list of libraries>)
+#
+
+MACRO(DEAL_II_APPEND_LIBRARIES)
+
+ SET(_toggle "general")
+ 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 DEAL_II_EXTERNAL_LIBRARIES ${_tmp})
+ ELSEIF("${_toggle}" STREQUAL "debug")
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_DEBUG ${_tmp})
+ ELSEIF("${_toggle}" STREQUAL "optimized")
+ LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES_RELEASE ${_tmp})
+ ENDIF()
+ ENDIF()
+ ENDFOREACH()
+
+ENDMACRO()
)
TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
- ${DEAL_II_EXTERNAL_LIBRARIES}
${DEAL_II_EXTERNAL_LIBRARIES_${build}}
+ ${DEAL_II_EXTERNAL_LIBRARIES}
)
INSTALL(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}