mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-14 16:13:27 -06:00
If the module root is not explicitly specified, the loading of its configuration is delegated to a find module, which does a heuristic search in known/surrounding directories. Most OPM modules use the common logic in OpmPackage; this patch configures the search specifically for opm-autodiff.
45 lines
1.1 KiB
CMake
45 lines
1.1 KiB
CMake
# - Find OPM automatic differentiation library
|
|
#
|
|
# Defines the following variables:
|
|
# opm-autodiff_INCLUDE_DIRS Directory of header files
|
|
# opm-autodiff_LIBRARIES Directory of shared object files
|
|
# opm-autodiff_DEFINITIONS Defines that must be set to compile
|
|
# opm-autodiff_CONFIG_VARS List of defines that should be in config.h
|
|
# HAVE_OPM_AUTODIFF 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-autodiff-prereqs)
|
|
include (OpmPackage)
|
|
find_opm_package (
|
|
# module name
|
|
"opm-autodiff"
|
|
|
|
# dependencies
|
|
"${opm-autodiff_DEPS}"
|
|
|
|
# header to search for
|
|
"opm/autodiff/AutoDiff.hpp"
|
|
|
|
# library to search for
|
|
"opmautodiff"
|
|
|
|
# defines to be added to compilations
|
|
""
|
|
|
|
# test program
|
|
"#include <opm/autodiff/AutoDiff.hpp>
|
|
int main (void) {
|
|
Opm::AutoDiff<double> x = Opm::AutoDiff<double>::constant(42.);
|
|
(void) x;
|
|
return 0;
|
|
}
|
|
"
|
|
# config variables
|
|
"${opm-autodiff_CONFIG_VAR}"
|
|
)
|
|
include (UseDynamicBoost)
|
|
#debug_find_vars ("opm-autodiff")
|