From 1ac2cd83285144ce9b566dcb6cf4327a86fc36fe Mon Sep 17 00:00:00 2001
From: Markus Blatt <mblatt@dune-project.org>
Date: Mon, 29 Apr 2013 16:24:22 +0000
Subject: [PATCH] Added module local translation routines from configure to
 CMake options.

[[Imported from SVN: r1921]]
---
 configure.ac             |  1 +
 lib/CMakeLists.txt       |  2 ++
 lib/Makefile.am          |  7 +++++++
 lib/duneistlam2cmake.lib | 20 ++++++++++++++++++++
 4 files changed, 30 insertions(+)
 create mode 100644 lib/CMakeLists.txt
 create mode 100644 lib/Makefile.am
 create mode 100644 lib/duneistlam2cmake.lib

diff --git a/configure.ac b/configure.ac
index 80cdc50b6..a1c102a86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,7 @@ AC_CONFIG_FILES([Makefile
     dune/istl/test/Makefile
     dune/istl/Makefile
     dune/Makefile
+    lib/Makefile
     m4/Makefile
     dune-istl.pc])
 AC_OUTPUT
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
index 000000000..9611bd22b
--- /dev/null
+++ b/lib/CMakeLists.txt
@@ -0,0 +1,2 @@
+install(FILES duneistlam2cmake.lib
+  DESTINATION ${CMAKE_INSTALL_BINDIR}/../lib)
diff --git a/lib/Makefile.am b/lib/Makefile.am
new file mode 100644
index 000000000..769b46386
--- /dev/null
+++ b/lib/Makefile.am
@@ -0,0 +1,7 @@
+# $Id: $
+dunemodulelibdir=$(libdir)
+
+EXTRA_DIST = CMakeLists.txt duneistlam2cmake.lib
+dunemodulelib_DATA = duneistlam2cmake.li
+
+include $(top_srcdir)/am/global-rules
diff --git a/lib/duneistlam2cmake.lib b/lib/duneistlam2cmake.lib
new file mode 100644
index 000000000..1795bfb96
--- /dev/null
+++ b/lib/duneistlam2cmake.lib
@@ -0,0 +1,20 @@
+# -*-sh-*-
+
+##########################################
+###
+### Function for converting configure options
+### to CMake options for dune-common
+###
+##########################################
+
+# CMake Packages are case sensitive
+# This is a list of packages whose names converted
+# to lower case are used for configures
+# --with-<package> or without-<package> options
+#
+
+dune_istl_options_am2cmake(){
+    local CMAKE_PACKAGES="ParMETIS SuperLU METIS"
+    default_am2cmake_options $CMAKE_PACKAGES
+    default_am2cmake_libraries $CMAKE_PACKAGES
+}
-- 
GitLab