Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • jakub.both/dune-common
  • samuel.burbulla/dune-common
  • patrick.jaap/dune-common
  • tobias.leibner/dune-common
  • alexander.mueller/dune-common
  • pipping/dune-common
  • Xinyun.Li/dune-common
  • felix.schindler/dune-common
  • simon.praetorius/dune-common
  • ani.anciaux-sedrakian/dune-common
  • henrik.stolzmann/dune-common
  • matthew.t.collins/dune-common
  • liam.keegan/dune-common
  • felix.mueller/dune-common
  • ansgar/dune-common
  • dominic/dune-common
  • lars.lubkoll/dune-common
  • exadune/dune-common
  • felix.gruber/dune-common
  • govind.sahai/dune-common
  • michael.sghaier/dune-common
  • core/dune-common
  • kilian.weishaupt/dune-common
  • markus.blatt/dune-common
  • joscha.podlesny/dune-common
  • tobias.meyer.andersen/dune-common
  • andreas.thune/dune-common
  • lars.bilke/dune-common
  • daniel.kienle/dune-common
  • lukas.renelt/dune-common
  • smuething/dune-common
  • stephan.hilb/dune-common
  • tkoch/dune-common
  • nils.dreier/dune-common
  • rene.milk/dune-common
  • lasse.hinrichsen/dune-common
  • yunus.sevinchan/dune-common
  • lisa_julia.nebel/dune-common
  • claus-justus.heine/dune-common
  • lorenzo.cerrone/dune-common
  • eduardo.bueno/dune-common
41 results
Show changes
Commits on Source (11)
Showing
with 70 additions and 43 deletions
# Defines the functions to use BLAS/Lapack
#
# .. cmake_function:: add_dune_blas_lapack_flags
#
# .. cmake_param:: targets
# :positional:
# :single:
# :required:
#
# A list of targets to use BLAS/Lapack with.
#
include_guard(GLOBAL)
set_package_properties("BLAS" PROPERTIES
DESCRIPTION "fast linear algebra routines")
set_package_properties("LAPACK" PROPERTIES
DESCRIPTION "fast linear algebra routines")
# register HAVE_BLAS and HAVE_LAPACK for config.h
set(HAVE_BLAS ${BLAS_FOUND})
set(HAVE_LAPACK ${LAPACK_FOUND})
# register Lapack library as dune package
if(HAVE_LAPACK)
dune_register_package_flags(LIBRARIES "${LAPACK_LIBRARIES}")
cmake_push_check_state()
set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
check_function_exists("dsyev_" LAPACK_NEEDS_UNDERLINE)
cmake_pop_check_state()
elseif(HAVE_BLAS)
dune_register_package_flags(LIBRARIES "${BLAS_LIBRARIES}")
endif()
# add function to link against the BLAS/Lapack library
function(add_dune_blas_lapack_flags _targets)
foreach(_target ${_targets})
if(LAPACK_FOUND)
target_link_libraries(${_target} PUBLIC ${LAPACK_LIBRARIES})
elseif(BLAS_FOUND)
target_link_libraries(${_target} PUBLIC ${BLAS_LIBRARIES})
endif()
endforeach(_target)
endfunction(add_dune_blas_lapack_flags)
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# A list of targets to use GMP with. # A list of targets to use GMP with.
# #
include_guard(GLOBAL)
# set HAVE_GMP for the config.h file # set HAVE_GMP for the config.h file
set(HAVE_GMP ${GMP_FOUND}) set(HAVE_GMP ${GMP_FOUND})
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# A list of targets to use METIS with. # A list of targets to use METIS with.
# #
include_guard(GLOBAL)
# register HAVE_METIS for config.h # register HAVE_METIS for config.h
set(HAVE_METIS ${METIS_FOUND}) set(HAVE_METIS ${METIS_FOUND})
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# A list of targets to use PTScotch with. # A list of targets to use PTScotch with.
# #
include_guard(GLOBAL)
# set HAVE_PTSCOTCH for config.h # set HAVE_PTSCOTCH for config.h
set(HAVE_PTSCOTCH ${PTScotch_FOUND}) set(HAVE_PTSCOTCH ${PTScotch_FOUND})
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# A list of targets to use ParMETIS with. # A list of targets to use ParMETIS with.
# #
include_guard(GLOBAL)
# set HAVE_PARMETIS for config.h # set HAVE_PARMETIS for config.h
set(HAVE_PARMETIS ${ParMETIS_FOUND}) set(HAVE_PARMETIS ${ParMETIS_FOUND})
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# A list of targets to use QuadMath with. # A list of targets to use QuadMath with.
# #
include_guard(GLOBAL)
# set HAVE_QUADMATH for config.h # set HAVE_QUADMATH for config.h
set(HAVE_QUADMATH ${QuadMath_FOUND}) set(HAVE_QUADMATH ${QuadMath_FOUND})
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# A list of targets to use SuiteSparse with. # A list of targets to use SuiteSparse with.
# #
include_guard(GLOBAL)
# set HAVE_SUITESPARSE for config.h # set HAVE_SUITESPARSE for config.h
set(HAVE_SUITESPARSE ${SuiteSparse_FOUND}) set(HAVE_SUITESPARSE ${SuiteSparse_FOUND})
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
# #
# A list of targets to use TBB with. # A list of targets to use TBB with.
# #
include_guard(GLOBAL)
# set variable for config.h # set variable for config.h
set(HAVE_TBB ${TBB_FOUND}) set(HAVE_TBB ${TBB_FOUND})
......
# Always link threading libraries to targets include_guard(GLOBAL)
# text for feature summary
set_package_properties("Threads" PROPERTIES
DESCRIPTION "Multi-threading library")
# set HAVE_THREADS for config.h # set HAVE_THREADS for config.h
set(HAVE_THREADS ${Threads_FOUND}) set(HAVE_THREADS ${Threads_FOUND})
......
...@@ -12,6 +12,13 @@ ...@@ -12,6 +12,13 @@
# #
# A list of targets to use VC with. # A list of targets to use VC with.
# #
include_guard(GLOBAL)
# text for feature summary
set_package_properties("Vc" PROPERTIES
DESCRIPTION "C++ Vectorization library"
URL "https://github.com/VcDevel/Vc"
PURPOSE "For use of SIMD instructions")
function(add_dune_vc_flags _targets) function(add_dune_vc_flags _targets)
if(Vc_FOUND) if(Vc_FOUND)
......
...@@ -2,6 +2,7 @@ add_subdirectory(FindPkgConfig) ...@@ -2,6 +2,7 @@ add_subdirectory(FindPkgConfig)
add_subdirectory(FindPython3) add_subdirectory(FindPython3)
install(FILES install(FILES
AddBLASLapackFlags.cmake
AddGMPFlags.cmake AddGMPFlags.cmake
AddMETISFlags.cmake AddMETISFlags.cmake
AddParMETISFlags.cmake AddParMETISFlags.cmake
...@@ -16,7 +17,6 @@ install(FILES ...@@ -16,7 +17,6 @@ install(FILES
DuneAddPybind11Module.cmake DuneAddPybind11Module.cmake
DuneCMakeCompat.cmake DuneCMakeCompat.cmake
DuneCommonMacros.cmake DuneCommonMacros.cmake
DuneCxaDemangle.cmake
DuneDoc.cmake DuneDoc.cmake
DuneDoxygen.cmake DuneDoxygen.cmake
DuneEnableAllPackages.cmake DuneEnableAllPackages.cmake
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
# Example: Write CMAKE_GUARD dune-foo_FOUND if you want your module to only # Example: Write CMAKE_GUARD dune-foo_FOUND if you want your module to only
# build when the dune-foo module is present. # build when the dune-foo module is present.
# #
include_guard(GLOBAL)
function(dune_add_pybind11_module) function(dune_add_pybind11_module)
include(CMakeParseArguments) include(CMakeParseArguments)
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
# #
# This is exactly the same as the ``list(FILTER ...)`` command available in # This is exactly the same as the ``list(FILTER ...)`` command available in
# cmake 3.7 and onward. # cmake 3.7 and onward.
include_guard(GLOBAL)
# list(FILTER...) was introduced in cmake 3.6, this is a compatibility # list(FILTER...) was introduced in cmake 3.6, this is a compatibility
# implementation for earlier cmakes # implementation for earlier cmakes
......
...@@ -6,20 +6,7 @@ dune_set_minimal_debug_level() ...@@ -6,20 +6,7 @@ dune_set_minimal_debug_level()
# search for lapack # search for lapack
find_package(LAPACK) find_package(LAPACK)
set(HAVE_LAPACK ${LAPACK_FOUND}) include(AddBLASLapackFlags)
if(${HAVE_LAPACK})
dune_register_package_flags(LIBRARIES "${LAPACK_LIBRARIES}")
cmake_push_check_state()
set(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
check_function_exists("dsyev_" LAPACK_NEEDS_UNDERLINE)
cmake_pop_check_state()
endif(${HAVE_LAPACK})
set(HAVE_BLAS ${BLAS_FOUND})
set_package_properties("BLAS" PROPERTIES
DESCRIPTION "fast linear algebra routines")
set_package_properties("LAPACK" PROPERTIES
DESCRIPTION "fast linear algebra routines")
find_package(GMP) find_package(GMP)
include(AddGMPFlags) include(AddGMPFlags)
...@@ -34,9 +21,6 @@ include(FindMProtect) ...@@ -34,9 +21,6 @@ include(FindMProtect)
# find the threading library # find the threading library
find_package(Threads) find_package(Threads)
include(AddThreadsFlags) include(AddThreadsFlags)
# text for feature summary
set_package_properties("Threads" PROPERTIES
DESCRIPTION "Multi-threading library")
# find library for Threading Building Blocks # find library for Threading Building Blocks
find_package(TBB) find_package(TBB)
...@@ -57,11 +41,6 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL Clang) AND ...@@ -57,11 +41,6 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL Clang) AND
endif() endif()
find_package(Vc ${MINIMUM_VC_VERSION} NO_MODULE) find_package(Vc ${MINIMUM_VC_VERSION} NO_MODULE)
include(AddVcFlags) include(AddVcFlags)
# text for feature summary
set_package_properties("Vc" PROPERTIES
DESCRIPTION "C++ Vectorization library"
URL "https://github.com/VcDevel/Vc"
PURPOSE "For use of SIMD instructions")
# Run the python extension of the Dune cmake build system # Run the python extension of the Dune cmake build system
include(DunePythonCommonMacros) include(DunePythonCommonMacros)
# This module checks whether the compiler supports the
# abi::__cxa_demangle function required to
# make the type names returned by typeid() human-readable
#
# It sets the variable :code:`HAVE_CXA_DEMANGLE` with the result.
#
include(CheckCXXSourceCompiles)
CHECK_CXX_SOURCE_COMPILES("#include <typeinfo>
#include <cxxabi.h>
int main(void){
int foobar = 0;
const char *foo = typeid(foobar).name();
int status;
char *demangled = abi::__cxa_demangle( foo, 0, 0, &status );
}" HAVE_CXA_DEMANGLE)
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
# target. See https://gitlab.kitware.com/cmake/cmake/issues/8438 # target. See https://gitlab.kitware.com/cmake/cmake/issues/8438
# and https://gitlab.dune-project.org/core/dune-common/issues/36 # and https://gitlab.dune-project.org/core/dune-common/issues/36
# #
include_guard(GLOBAL)
include(UseLatexMk) include(UseLatexMk)
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
# The documentation is built during the top-level :code:`make doc` call. We have added a dependency # The documentation is built during the top-level :code:`make doc` call. We have added a dependency
# that makes sure it is built before running :code:`make install`. # that makes sure it is built before running :code:`make install`.
# #
include_guard(GLOBAL)
find_package(Doxygen) find_package(Doxygen)
set_package_properties("Doxygen" PROPERTIES set_package_properties("Doxygen" PROPERTIES
......
...@@ -140,6 +140,7 @@ ...@@ -140,6 +140,7 @@
# #
# Register sources for module exported library. # Register sources for module exported library.
# #
include_guard(GLOBAL)
function(dune_register_package_flags) function(dune_register_package_flags)
include(CMakeParseArguments) include(CMakeParseArguments)
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# exits on non-zero exit codes. All arguments are forwarded to the actual # exits on non-zero exit codes. All arguments are forwarded to the actual
# cmake command. # cmake command.
# #
include_guard(GLOBAL)
function(dune_execute_process) function(dune_execute_process)
include(CMakeParseArguments) include(CMakeParseArguments)
......
...@@ -463,7 +463,6 @@ ...@@ -463,7 +463,6 @@
# :ref:`dune_instance_begin() # :ref:`dune_instance_begin()
# <dune_instance_begin>`/:ref:`dune_instance_end() <dune_instance_end>` # <dune_instance_begin>`/:ref:`dune_instance_end() <dune_instance_end>`
# block. # block.
include_guard(GLOBAL) include_guard(GLOBAL)
# macro to print additional information to the cmake output file. # macro to print additional information to the cmake output file.
......