From 53d09b1581c209abf195d25e1bcf16339ecd31f1 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 6 Jan 2015 13:42:23 +0100 Subject: [PATCH 1/3] eWoms: silence an annoying bogous deprecation warning on Dune 2.4 --- cmake/Modules/ewoms-prereqs.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/Modules/ewoms-prereqs.cmake b/cmake/Modules/ewoms-prereqs.cmake index 80f4cb71..c8f5d6a7 100644 --- a/cmake/Modules/ewoms-prereqs.cmake +++ b/cmake/Modules/ewoms-prereqs.cmake @@ -1,10 +1,15 @@ # -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*- # vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap: +# this avoids an annoying deprecation warning on DUNE 2.4 (which we +# are not interested in anyway) +set(DUNE_AVOID_CAPABILITIES_IS_PARALLEL_DEPRECATION_WARNING 1) + # defines that must be present in config.h for our headers set (ewoms_CONFIG_VAR HAVE_QUAD HAVE_VALGRIND + DUNE_AVOID_CAPABILITIES_IS_PARALLEL_DEPRECATION_WARNING ) # dependencies From 3421ce27d51dbc02ac8ab65b98bd7f73b3a49e64 Mon Sep 17 00:00:00 2001 From: Robert K Date: Mon, 19 Jan 2015 17:25:32 +0100 Subject: [PATCH 2/3] fix metis check for gentoo installed METIS version. --- cmake/Modules/FindMETIS.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/FindMETIS.cmake b/cmake/Modules/FindMETIS.cmake index 86cfa31b..17bf8937 100644 --- a/cmake/Modules/FindMETIS.cmake +++ b/cmake/Modules/FindMETIS.cmake @@ -20,7 +20,7 @@ endif() find_path (METIS_INCLUDE_DIRS NAMES "metis.h" PATHS ${METIS_SEARCH_PATH} - PATH_SUFFIXES "include" "METISLib" + PATH_SUFFIXES "include" "METISLib" "include/metis" ${METIS_NO_DEFAULT_PATH}) # only search in architecture-relevant directory @@ -39,7 +39,7 @@ if (METIS_INCLUDE_DIRS OR METIS_LIBRARIES) set(METIS_FOUND TRUE) set(HAVE_METIS TRUE) endif() - + # print a message to indicate status of this package include (FindPackageHandleStandardArgs) find_package_handle_standard_args(METIS From 5fdfd1aca1757805299ad1158cd049ecd376e861 Mon Sep 17 00:00:00 2001 From: Robert K Date: Wed, 21 Jan 2015 16:33:21 +0100 Subject: [PATCH 3/3] add cmake module for ZOLTAN also, link it to alugrid if it has been detected. --- cmake/Modules/FindZOLTAN.cmake | 51 ++++++++++++++++++++++++++++ cmake/Modules/Finddune-alugrid.cmake | 1 + 2 files changed, 52 insertions(+) create mode 100644 cmake/Modules/FindZOLTAN.cmake diff --git a/cmake/Modules/FindZOLTAN.cmake b/cmake/Modules/FindZOLTAN.cmake new file mode 100644 index 00000000..e360ae9e --- /dev/null +++ b/cmake/Modules/FindZOLTAN.cmake @@ -0,0 +1,51 @@ +# -*-cmake-*- +# +# Try to find the libzoltan graph partioning library +# +# Once done, this will define: +# +# ZOLTAN_FOUND - system has the libzoltan graph partioning library +# HAVE_ZOLTAN - like ZOLTAN_FOUND, but for the inclusion in config.h +# ZOLTAN_INCLUDE_DIR - incude paths to use libzoltan +# ZOLTAN_LIBRARIES - Link these to use libzoltan + +set(ZOLTAN_SEARCH_PATH "/usr" "/usr/local" "/opt" "/opt/local") +set(ZOLTAN_NO_DEFAULT_PATH "") +if(ZOLTAN_ROOT) + set(ZOLTAN_SEARCH_PATH "${ZOLTAN_ROOT}") + set(ZOLTAN_NO_DEFAULT_PATH "NO_DEFAULT_PATH") +endif() + +# search for files which implements this module +find_path (ZOLTAN_INCLUDE_DIRS + NAMES "zoltan.h" + PATHS ${ZOLTAN_SEARCH_PATH} + PATH_SUFFIXES "include" + ${ZOLTAN_NO_DEFAULT_PATH}) + +# only search in architecture-relevant directory +if (CMAKE_SIZEOF_VOID_P) + math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") +endif (CMAKE_SIZEOF_VOID_P) + +find_library(ZOLTAN_LIBRARIES + NAMES "zoltan" + PATHS ${ZOLTAN_SEARCH_PATH} + PATH_SUFFIXES "lib/.libs" "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" + ${ZOLTAN_NO_DEFAULT_PATH}) + +set (ZOLTAN_FOUND FALSE) +if (ZOLTAN_INCLUDE_DIRS OR ZOLTAN_LIBRARIES) + set(ZOLTAN_FOUND TRUE) + set(HAVE_ZOLTAN 1) +endif() + +set (ZOLTAN_CONFIG_VAR HAVE_ZOLTAN) + +# print a message to indicate status of this package +include (FindPackageHandleStandardArgs) +find_package_handle_standard_args(ZOLTAN + DEFAULT_MSG + ZOLTAN_LIBRARIES + ZOLTAN_INCLUDE_DIRS + ) diff --git a/cmake/Modules/Finddune-alugrid.cmake b/cmake/Modules/Finddune-alugrid.cmake index db2d4c90..f2199a09 100644 --- a/cmake/Modules/Finddune-alugrid.cmake +++ b/cmake/Modules/Finddune-alugrid.cmake @@ -22,6 +22,7 @@ find_opm_package ( "CXX11Features REQUIRED; dune-grid REQUIRED; ZLIB REQUIRED; + ZOLTAN; METIS " # header to search for