Merge pull request #138 from bska/enable-opm-flowdiagnostics

Recognize OPM-Flowdiagnostics as an OPM Module
This commit is contained in:
Arne Morten Kvarving
2016-06-09 11:51:55 +02:00
2 changed files with 67 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
# - Find OPM Flow Diagnostics Library
#
# Defines the following variables:
# opm-flowdiagnostics_INCLUDE_DIRS Directory of header files
# opm-flowdiagnostics_LIBRARIES Directory of shared object files
# opm-flowdiagnostics_DEFINITIONS Defines that must be set to compile
# opm-flowdiagnostics_CONFIG_VARS List of defines that should be in config.h
# HAVE_OPM_FLOWDIAGNOSTICS 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-flowdiagnostics-prereqs)
include (OpmPackage)
find_opm_package (
# module name
"opm-flowdiagnostics"
# dependencies
"${opm-flowdiagnostics_DEPS}"
# header to search for
"opm/flowdiagnostics/reorder/tarjan.h"
# library to search for
"opmflowdiagnostics"
# defines to be added to compilations
""
# test program
"#include <opm/flowdiagnostics/reorder/tarjan.h>
int main() {
const int ia[] = { 0, 0, 1, 2, 4 };
const int ja[] = { 0, 0, 1, 2 };
int vert[4] = { 0 };
int comp[4 + 1] = { 0 };
int ncomp = 0 ;
int work[3 * 4] = { 0 };
tarjan(4, ia, ja, vert, comp, &ncomp, work);
}
"
# config variables
"${opm-flowdiagnostics_CONFIG_VAR}"
)

View File

@@ -0,0 +1,18 @@
# -*- 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-flowdiagnostics_CONFIG_VAR
)
# dependencies
set (opm-flowdiagnostics_DEPS
# compile with C99 support if available
"C99"
# compile with C++0x/11 support if available
"CXX11Features REQUIRED"
"Boost 1.44.0
COMPONENTS unit_test_framework REQUIRED"
# prerequisite OPM modules
"opm-common REQUIRED"
)