From 1269d918a22114f9902f8733a24e5c293d4c9240 Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Thu, 28 Jan 2016 13:27:45 -0700 Subject: [PATCH 1/2] Finddune-alugrid: find the package when build with cmake or autotools (libs differ) --- cmake/Modules/Finddune-alugrid.cmake | 37 +++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/cmake/Modules/Finddune-alugrid.cmake b/cmake/Modules/Finddune-alugrid.cmake index efa291600..0298edffb 100644 --- a/cmake/Modules/Finddune-alugrid.cmake +++ b/cmake/Modules/Finddune-alugrid.cmake @@ -11,6 +11,7 @@ # This code is licensed under The GNU General Public License v3.0 include (OpmPackage) +# find dune-alugrid when build with cmake find_opm_package ( # module name "dune-alugrid" @@ -21,7 +22,41 @@ find_opm_package ( # we just include them to forward here in case anyone else does "CXX11Features REQUIRED; dune-grid REQUIRED; - ZLIB REQUIRED; + ZLIB; + ZOLTAN; + METIS + " + # header to search for + "dune/alugrid/grid.hh" + + # library to search for + "dunealugrid" + + # defines to be added to compilations + "" + + # test program +"#include +int main (void) { + return 0; +} +" + # config variables + "HAVE_DUNE_ALUGRID + ") + +# find dune-alugrid when build with autotools (deprecated in dune 2.4 and removed after dune 3.0 +find_opm_package ( + # module name + "dune-alugrid" + + # dependencies + # TODO: we should probe for all the HAVE_* values listed below; + # however, we don't actually use them in our implementation, so + # we just include them to forward here in case anyone else does + "CXX11Features REQUIRED; + dune-grid REQUIRED; + ZLIB; ZOLTAN; METIS " From 40573e6c5774fe39d3db4fc67c5db493ef89ec1c Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Thu, 28 Jan 2016 13:42:55 -0700 Subject: [PATCH 2/2] Finddune-alugrid: switch order of appearance. --- cmake/Modules/Finddune-alugrid.cmake | 68 ++++++++++++++-------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/cmake/Modules/Finddune-alugrid.cmake b/cmake/Modules/Finddune-alugrid.cmake index 0298edffb..bf1224794 100644 --- a/cmake/Modules/Finddune-alugrid.cmake +++ b/cmake/Modules/Finddune-alugrid.cmake @@ -11,40 +11,6 @@ # This code is licensed under The GNU General Public License v3.0 include (OpmPackage) -# find dune-alugrid when build with cmake -find_opm_package ( - # module name - "dune-alugrid" - - # dependencies - # TODO: we should probe for all the HAVE_* values listed below; - # however, we don't actually use them in our implementation, so - # we just include them to forward here in case anyone else does - "CXX11Features REQUIRED; - dune-grid REQUIRED; - ZLIB; - ZOLTAN; - METIS - " - # header to search for - "dune/alugrid/grid.hh" - - # library to search for - "dunealugrid" - - # defines to be added to compilations - "" - - # test program -"#include -int main (void) { - return 0; -} -" - # config variables - "HAVE_DUNE_ALUGRID - ") - # find dune-alugrid when build with autotools (deprecated in dune 2.4 and removed after dune 3.0 find_opm_package ( # module name @@ -79,6 +45,40 @@ int main (void) { "HAVE_DUNE_ALUGRID ") +# find dune-alugrid when build with cmake +find_opm_package ( + # module name + "dune-alugrid" + + # dependencies + # TODO: we should probe for all the HAVE_* values listed below; + # however, we don't actually use them in our implementation, so + # we just include them to forward here in case anyone else does + "CXX11Features REQUIRED; + dune-grid REQUIRED; + ZLIB; + ZOLTAN; + METIS + " + # header to search for + "dune/alugrid/grid.hh" + + # library to search for + "dunealugrid" + + # defines to be added to compilations + "" + + # test program +"#include +int main (void) { + return 0; +} +" + # config variables + "HAVE_DUNE_ALUGRID + ") + #debug_find_vars ("dune-grid") # make version number available in config.h