From b032fc0d051569dea61d0effc2ea6cd4def2e9e5 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 14 Mar 2016 13:43:32 +0100 Subject: [PATCH] Added cmake files for opm-output. --- cmake/Modules/Findopm-output.cmake | 42 ++++++++++++++++++++++++++ cmake/Modules/opm-output-prereqs.cmake | 24 +++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 cmake/Modules/Findopm-output.cmake create mode 100644 cmake/Modules/opm-output-prereqs.cmake diff --git a/cmake/Modules/Findopm-output.cmake b/cmake/Modules/Findopm-output.cmake new file mode 100644 index 000000000..8ccad216b --- /dev/null +++ b/cmake/Modules/Findopm-output.cmake @@ -0,0 +1,42 @@ +# - Find OPM output library +# +# Defines the following variables: +# opm-output_INCLUDE_DIRS Directory of header files +# opm-output_LIBRARIES Directory of shared object files +# opm-output_DEFINITIONS Defines that must be set to compile +# opm-output_CONFIG_VARS List of defines that should be in config.h +# HAVE_OPM_OUTPUT Binary value to use in config.h + +# Copyright (C) 2012 Uni Research AS +# This code is licensed under The GNU General Public License v3.0 + +# use the generic find routine +include (opm-output-prereqs) +include (OpmPackage) +find_opm_package ( + # module name + "opm-output" + + # dependencies + "${opm-output_DEPS}" + + # header to search for + "opm/output/Output.hpp" + + # library to search for + # "opmoutput" + + # defines to be added to compilations + "" + + # test program +"#include +int main (void) { + return 0; +} +" + # config variables + "${opm-output_CONFIG_VAR}" + ) +include (UseDynamicBoost) +#debug_find_vars ("opm-output") diff --git a/cmake/Modules/opm-output-prereqs.cmake b/cmake/Modules/opm-output-prereqs.cmake new file mode 100644 index 000000000..e4904bb04 --- /dev/null +++ b/cmake/Modules/opm-output-prereqs.cmake @@ -0,0 +1,24 @@ +# -*- 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: + +# defines that must be present in config.h for our headers +set (opm-core_CONFIG_VAR + HAVE_ERT + ) + +# dependencies +set (opm-output_DEPS + # compile with C99 support if available + "C99" + # compile with C++0x/11 support if available + "CXX11Features REQUIRED" + # various runtime library enhancements + "Boost 1.44.0 + COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + # Ensembles-based Reservoir Tools (ERT) + "ERT REQUIRED" + # Look for MPI support + "opm-common REQUIRED" + # Parser library for ECL-type simulation models + "opm-parser REQUIRED" + )