Newer
Older
# This file is part of the dune-xt-common project:
# https://github.com/dune-community/dune-xt-common
# Copyright 2009-2018 dune-xt-common developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
# with "runtime exception" (http://www.dune-project.org/license.html)
# Felix Schindler (2013 - 2014, 2016 - 2017)
# enables "IN_LIST operator
cmake_policy(SET CMP0057 NEW)
include(XtCompilerSupport)
include(XtTooling)
# library checks #########################################################################
set(DS_REQUIRED_BOOST_LIBS atomic chrono date_time filesystem system thread timer)
find_package(PkgConfig)
find_package(Boost 1.48.0 COMPONENTS ${DS_REQUIRED_BOOST_LIBS} REQUIRED)
dune_register_package_flags(INCLUDE_DIRS ${Boost_INCLUDE_DIRS})
foreach(_boost_lib ${DS_REQUIRED_BOOST_LIBS})
set(_BOOST_LIB "")
string(TOUPPER "${_boost_lib}" _BOOST_LIB)
dune_register_package_flags(LIBRARIES ${Boost_${_BOOST_LIB}_LIBRARY})
dune_register_package_flags(LIBRARIES Boost::${_boost_lib})
endif()
endforeach(_boost_lib ${DS_REQUIRED_BOOST_LIBS})
find_package(Eigen3 3.2.0)
dune_register_package_flags(INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR} COMPILE_DEFINITIONS "ENABLE_EIGEN=1")
dune_register_package_flags(COMPILE_DEFINITIONS "ENABLE_EIGEN=0")
# intel mic and likwid don't mix
if(NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "k1om")
include(FindLIKWID)
find_package(LIKWID)
if(LIKWID_FOUND)
dune_register_package_flags(INCLUDE_DIRS ${LIKWID_INCLUDE_DIR} LIBRARIES ${LIKWID_LIBRARY})
endif(LIKWID_FOUND)
include(FindMPI4PY)
if(MPI4PY_FOUND)
# this only works in dependent modules
dune_register_package_flags(INCLUDE_DIRS "${MPI4PY_INCLUDE_DIR}")
# this only works in dune-xt-common itself
include_directories("${MPI4PY_INCLUDE_DIR}")
else()
message(FATAL_ERROR "MPI enabled builds need mpi4py too")
endif()
# end library checks #####################################################################
# misc vars #########################################################################
set(CMAKE_EXPORT_COMPILE_COMMANDS "ON")
set(DS_MAX_MIC_THREADS CACHE INTEGER 120)
set(DUNE_XT_COMMON_TEST_DIR ${dune-xt_SOURCE_DIR}/dune/xt/common/test)
set(ENABLE_PERFMON 0 CACHE STRING "enable likwid performance monitoring API usage")
set(DXT_TEST_TIMEOUT 180 CACHE STRING "per-test timeout in seconds")
set(DXT_TEST_PROCS 1 CACHE STRING "run N tests in parallel")
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# ~~~
# This file is part of the dune-xt-functions project:
# https://github.com/dune-community/dune-xt-functions
# Copyright 2009-2018 dune-xt-functions developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
# with "runtime exception" (http://www.dune-project.org/license.html)
# Authors:
# Felix Schindler (2016 - 2017)
# René Fritze (2018)
# Tim Keil (2018)
# Tobias Leibner (2018)
#
# File for module specific CMake tests.
# ~~~
# ~~~
# This file is part of the dune-xt-grid project:
# https://github.com/dune-community/dune-xt-grid
# Copyright 2009-2018 dune-xt-grid developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
# with "runtime exception" (http://www.dune-project.org/license.html)
# Authors:
# Felix Schindler (2016 - 2018)
# René Fritze (2017 - 2018)
# Tobias Leibner (2018)
#
# File for module specific CMake tests.
# ~~~
set(DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS TRUE)
# ~~~
# This file is part of the dune-xt-la project:
# https://github.com/dune-community/dune-xt-la
# Copyright 2009-2018 dune-xt-la developers and contributors. All rights reserved.
# License: Dual licensed as BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# or GPL-2.0+ (http://opensource.org/licenses/gpl-license)
# with "runtime exception" (http://www.dune-project.org/license.html)
# Authors:
# Felix Schindler (2016 - 2017)
# René Fritze (2018)
#
# File for module specific CMake tests.
# ~~~