Skip to content
Snippets Groups Projects
Commit b63d7acb authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[cmake][cleanup] Remove build-system support for Boost.

If you rely on it, add the deleted CMake files to your module.
parent 49879f16
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,6 @@ class target_flags:
'SUPERLU_': ['add_dune_superlu_flags', ''],
'DUNEMPI': ['add_dune_mpi_flags', ''],
'AMIRAMESH_': ['add_dune_amiramesh_flags',''],
'BOOST_': ['add_dune_boost_flags',''],
'GMP_': ['add_dune_gmp_flags',''],
'GRAPE_': ['add_dune_grape_flags',''],
'PARMETIS_': ['add_dune_parmetis_flags',''],
......
......@@ -6,7 +6,6 @@ install(FILES
AddUMFPackFlags.cmake
CheckCXXFeatures.cmake
CheckForPthreads.c
DuneBoost.cmake
DuneCMakePackageConfigHelpers.cmake
DuneCommonMacros.cmake
DuneCxaDemangle.cmake
......@@ -20,7 +19,6 @@ install(FILES
DuneSymlinkOrCopy.cmake
DuneTestMacros.cmake
DuneTests.cmake
FindBoostFusion.cmake
FindGMP.cmake
FindInkscape.cmake
FindMETIS.cmake
......
# Searches for boost and provides the following function:
#
# add_dune_boost_flags(targets [LINK_ALL_BOOST_LIBRARIES]
# LIBRARIES lib1 lib2 ...)
#
# Adds boost compiler flags and libraries, and activates
# Boost for the specified targets. Libraries can either be
# provided by listing them after the LIBRARIES keyword or one
# can request linking with all available boost libraries by
# passing the LINK_ALL_BOOST_LIBRARIES option to the function
# call.
find_package(Boost)
set(HAVE_DUNE_BOOST ${Boost_FOUND})
# register all boost related flags
# TODO What about boost libraries? Do we even rely on such?
if(HAVE_DUNE_BOOST)
dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_BOOST=1"
INCLUDE_DIRS "${Boost_INCLUDE_DIRS}")
endif()
function(add_dune_boost_flags _targets)
cmake_parse_arguments(DUNE_BOOST LINK_ALL_BOOST_LIBRARIES "" LIBRARIES ${ARGN})
if(Boost_FOUND)
include_directories("${Boost_INCLUDE_DIRS}")
foreach(_target ${_targets})
if(DUNE_BOOST_LINK_ALL_BOOST_LIBRARIES)
target_link_libraries(${_target} "${DUNE_Boost_LIBRARIES}")
else(DUNE_BOOST_LINK_ALL_BOOST_LIBRARIES)
target_link_libraries(${_target} "${DUNE_BOOST_LIBRARIES}")
endif(DUNE_BOOST_LINK_ALL_BOOST_LIBRARIES)
# The definitions are a hack as we do not seem to know which MPI implementation was
# found.
GET_TARGET_PROPERTY(_props ${_target} COMPILE_FLAGS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
SET_TARGET_PROPERTIES(${_target} PROPERTIES COMPILE_FLAGS
"${_props} -DENABLE_BOOST=1")
endforeach(_target)
endif(Boost_FOUND)
endfunction(add_dune_boost_flags)
#
# Module that checks whether boost::fusion is available and usable.
#
# Sets the follwing variable:
#
# HAVE_BOOST_FUSION True if boost::fusion is available.
#
include(DuneBoost)
if(HAVE_DUNE_BOOST)
message(STATUS "Checking whether the Boost::FUSION library is available.")
check_cxx_source_compiles("
\#include <boost/fusion/container.hpp>
int main(){
boost::fusion::vector<int,char,double> v;
return 0;
}" HAVE_BOOST_FUSION )
if(HAVE_BOOST_FUSION)
message(STATUS "Boost::FUSION is available")
endif(HAVE_BOOST_FUSION)
else()
message(STATUS "Skipping check for Boost::FUSION as Boost is not available.")
endif()
......@@ -5,7 +5,6 @@ MODULES = \
AddPTScotchFlags.cmake \
AddUMFPackFlags.cmake \
CheckCXXFeatures.cmake \
DuneBoost.cmake \
DuneCMakePackageConfigHelpers.cmake \
DuneCommonMacros.cmake \
DuneCxaDemangle.cmake \
......@@ -19,7 +18,6 @@ MODULES = \
DuneSymlinkOrCopy.cmake \
DuneTestMacros.cmake \
DuneTests.cmake \
FindBoostFusion.cmake \
FindGMP.cmake \
FindInkscape.cmake \
FindMETIS.cmake \
......
......@@ -29,9 +29,6 @@
/* Define if you have a BLAS library. */
#cmakedefine HAVE_BLAS 1
/* Define to ENABLE_BOOST if the Boost library is available */
#cmakedefine HAVE_DUNE_BOOST ENABLE_BOOST
/* does the compiler support abi::__cxa_demangle */
#cmakedefine HAVE_CXA_DEMANGLE 1
......
......@@ -17,7 +17,7 @@ dune_common_options_am2cmake()
# to lower case are used for configures
# --with-<package> or without-<package> options
#
CMAKE_PACKAGES="Boost Inkscape GMP LAPACK UMFPack"
CMAKE_PACKAGES="Inkscape GMP LAPACK UMFPack"
default_am2cmake_options $CMAKE_PACKAGES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment