mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-03 23:30:28 -06:00
5d5e18c2ce
Some features, such as the Fortran wrappers, are enabled by options, and it may be usable to have those set in a common definition file. However, as these features are included conditionally based on use, their option variables may not exist in other projects, giving a CMake warning for them. Here we list such variables too. Reading them at the end corresponds to the Autotools convention of ignoring unknown --enable-xxx options.
59 lines
1.3 KiB
CMake
59 lines
1.3 KiB
CMake
# -*- 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:
|
|
|
|
# features that may be used by some packages (Fortran wrappers
|
|
# for instance), and this set options for, but which is included
|
|
# conditionally and thus does not exist in other packages
|
|
set (FEATURE_VARS
|
|
USE_UNDERSCORING
|
|
)
|
|
|
|
# emulate the with-xxx feature of autotools to not give warnings
|
|
# if we specify the directories of packages that are known to the
|
|
# family but not necessarily used
|
|
|
|
# pick package names from these; opm-xxx, dune-xxx
|
|
set (KNOWN_FAMILIES
|
|
opm
|
|
dune
|
|
)
|
|
|
|
# variables to test; xxx_DIR, xxx_ROOT
|
|
set (KNOWN_VARS
|
|
DIR
|
|
ROOT
|
|
)
|
|
|
|
set (KNOWN_opm_PKGS
|
|
autodiff
|
|
core
|
|
material
|
|
parser
|
|
polymer
|
|
porsol
|
|
upscaling
|
|
verteq
|
|
)
|
|
|
|
set (KNOWN_dune_PKGS
|
|
common
|
|
cornerpoint
|
|
geometry
|
|
grid
|
|
istl
|
|
localfunctions
|
|
)
|
|
|
|
foreach (family IN ITEMS ${KNOWN_FAMILIES})
|
|
foreach (package IN ITEMS ${KNOWN_${family}_PKGS})
|
|
foreach (var IN ITEMS ${KNOWN_VARS})
|
|
# just "use" the variable, so we don't get warnings
|
|
set (_dummy ${${family}-${package}_${var}})
|
|
endforeach (var)
|
|
endforeach (package)
|
|
endforeach (family)
|
|
|
|
foreach (feature IN ITEMS ${FEATURE_VARS})
|
|
set (_dummy ${${feature}})
|
|
endforeach (feature)
|