From c3c3817d80e22197c0669226a0324637b3eb51a9 Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Thu, 14 Nov 2013 12:51:12 +0100 Subject: [PATCH 01/26] Added required dependencies on opm-parser and CJSON --- cmake/Modules/opm-core-prereqs.cmake | 51 ++++++++++++++-------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/cmake/Modules/opm-core-prereqs.cmake b/cmake/Modules/opm-core-prereqs.cmake index 41419b15a..b46cf9895 100644 --- a/cmake/Modules/opm-core-prereqs.cmake +++ b/cmake/Modules/opm-core-prereqs.cmake @@ -3,33 +3,34 @@ # defines that must be present in config.h for our headers set (opm-core_CONFIG_VAR - HAVE_ERT - HAVE_SUITESPARSE_UMFPACK_H - ) + HAVE_ERT + HAVE_SUITESPARSE_UMFPACK_H + ) # dependencies set (opm-core_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" - # matrix library - "BLAS REQUIRED" - "LAPACK REQUIRED" - # Tim Davis' SuiteSparse archive - "SuiteSparse COMPONENTS umfpack" - # solver - "SuperLU" - # xml processing (for config parsing) - "TinyXML" + # compile with C99 support if available + "C99" + # compile with C++0x/11 support if available + "CXX11Features REQUIRED" + # various runtime library enhancements + "Boost 1.39.0 + COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + # matrix library + "BLAS REQUIRED" + "LAPACK REQUIRED" + # Tim Davis' SuiteSparse archive + "SuiteSparse COMPONENTS umfpack" + # solver + "SuperLU" + # xml processing (for config parsing) + "TinyXML" #Parser library "opm-parser REQUIRED" - # Ensembles-based Reservoir Tools (ERT) - "ERT" - # DUNE dependency - "dune-common" - "dune-istl" - ) + "cJSON REQUIRED" + # Ensembles-based Reservoir Tools (ERT) + "ERT" + # DUNE dependency + "dune-common" + "dune-istl" + ) From b834cfb89930f743062e3772f95bc767591b504d Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Fri, 15 Nov 2013 15:39:55 +0100 Subject: [PATCH 02/26] Removed explicit cJSON dependency from opm-core --- cmake/Modules/opm-core-prereqs.cmake | 51 ++++++++++++++-------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/cmake/Modules/opm-core-prereqs.cmake b/cmake/Modules/opm-core-prereqs.cmake index b46cf9895..bb8cb5fd1 100644 --- a/cmake/Modules/opm-core-prereqs.cmake +++ b/cmake/Modules/opm-core-prereqs.cmake @@ -3,34 +3,33 @@ # defines that must be present in config.h for our headers set (opm-core_CONFIG_VAR - HAVE_ERT - HAVE_SUITESPARSE_UMFPACK_H - ) + HAVE_ERT + HAVE_SUITESPARSE_UMFPACK_H + ) # dependencies set (opm-core_DEPS - # compile with C99 support if available - "C99" - # compile with C++0x/11 support if available - "CXX11Features REQUIRED" - # various runtime library enhancements - "Boost 1.39.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" - # matrix library - "BLAS REQUIRED" - "LAPACK REQUIRED" - # Tim Davis' SuiteSparse archive - "SuiteSparse COMPONENTS umfpack" - # solver - "SuperLU" - # xml processing (for config parsing) - "TinyXML" + # compile with C99 support if available + "C99" + # compile with C++0x/11 support if available + "CXX11Features REQUIRED" + # various runtime library enhancements + "Boost 1.39.0 + COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + # matrix library + "BLAS REQUIRED" + "LAPACK REQUIRED" + # Tim Davis' SuiteSparse archive + "SuiteSparse COMPONENTS umfpack" + # solver + "SuperLU" + # xml processing (for config parsing) + "TinyXML" #Parser library "opm-parser REQUIRED" - "cJSON REQUIRED" - # Ensembles-based Reservoir Tools (ERT) - "ERT" - # DUNE dependency - "dune-common" - "dune-istl" - ) + # Ensembles-based Reservoir Tools (ERT) + "ERT" + # DUNE dependency + "dune-common" + "dune-istl" + ) From fb3824e0daaf55e9b7f638f72cc1cc9fd75795df Mon Sep 17 00:00:00 2001 From: Joakim Hove Date: Mon, 18 Nov 2013 13:24:53 +0100 Subject: [PATCH 03/26] Raised the opm-core boost dependency to 1.44 to reflect parser requirement --- cmake/Modules/opm-core-prereqs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/opm-core-prereqs.cmake b/cmake/Modules/opm-core-prereqs.cmake index bb8cb5fd1..41419b15a 100644 --- a/cmake/Modules/opm-core-prereqs.cmake +++ b/cmake/Modules/opm-core-prereqs.cmake @@ -14,7 +14,7 @@ set (opm-core_DEPS # compile with C++0x/11 support if available "CXX11Features REQUIRED" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system unit_test_framework REQUIRED" # matrix library "BLAS REQUIRED" From 3112e465a06004cb55f37530efbb9a2c13b8111d Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Fri, 6 Dec 2013 23:31:57 +0100 Subject: [PATCH 04/26] Provide CMake find module for opm-autodiff 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. --- cmake/Modules/Findopm-autodiff.cmake | 44 ++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 cmake/Modules/Findopm-autodiff.cmake diff --git a/cmake/Modules/Findopm-autodiff.cmake b/cmake/Modules/Findopm-autodiff.cmake new file mode 100644 index 000000000..a126a8c74 --- /dev/null +++ b/cmake/Modules/Findopm-autodiff.cmake @@ -0,0 +1,44 @@ +# - 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 +int main (void) { + Opm::AutoDiff x = Opm::AutoDiff::constant(42.); + (void) x; + return 0; +} +" + # config variables + "${opm-autodiff_CONFIG_VAR}" + ) +include (UseDynamicBoost) +#debug_find_vars ("opm-autodiff") From 9f1934570beb94b2c77bad502cee92cf49cedd58 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Tue, 10 Dec 2013 21:01:22 +0100 Subject: [PATCH 05/26] Only add linker option if it is not really there This code is run unconditionally each time we do a reconfigure; if the option is added at each time, they will accumulate (needlessly) on the command-line, making it harder to inspect the log. --- cmake/Modules/UseOnlyNeeded.cmake | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/UseOnlyNeeded.cmake b/cmake/Modules/UseOnlyNeeded.cmake index fe8246bf1..16f3d078a 100644 --- a/cmake/Modules/UseOnlyNeeded.cmake +++ b/cmake/Modules/UseOnlyNeeded.cmake @@ -4,11 +4,23 @@ # in order to get only the minimal set of dependencies. function (prepend var_name value) - if (${var_name}) - set (${var_name} "${value} ${${var_name}}" PARENT_SCOPE) - else (${var_name}) - set (${var_name} "${value}") - endif (${var_name}) + # only add the prefix if it is not already at the beginning. this + # prevents the same string to be added at the same place every time + # we check for reconfiguration (e.g. "--as-needed" below) + string (LENGTH "${value}" _val_len) + string (LENGTH "${${var_name}}" _var_len) + if (NOT (${_var_len} LESS ${_val_len})) + string (SUBSTRING "${${var_name}}" 0 ${_val_len} _var_pre) + else (NOT (${_var_len} LESS ${_val_len})) + set (_var_pre) + endif (NOT (${_var_len} LESS ${_val_len})) + if (NOT ("${_var_pre}" STREQUAL "${value}")) + if (${var_name}) + set (${var_name} "${value} ${${var_name}}" PARENT_SCOPE) + else (${var_name}) + set (${var_name} "${value}") + endif (${var_name}) + endif (NOT ("${_var_pre}" STREQUAL "${value}")) endfunction (prepend var_name value) # only ELF shared objects can be underlinked, and only GNU will accept From b06d1a32a56eefd2b48bdb7c0f2272450fccf406 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Mon, 9 Dec 2013 11:44:38 +0100 Subject: [PATCH 06/26] Document modules and structures in the build system Give a brief description of each of the modules that comprises the build system, and the suffices that is used to form a virtual structure of variables for each project. --- cmake/OPM-CMake.md | 748 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 748 insertions(+) create mode 100644 cmake/OPM-CMake.md diff --git a/cmake/OPM-CMake.md b/cmake/OPM-CMake.md new file mode 100644 index 000000000..06a1183fc --- /dev/null +++ b/cmake/OPM-CMake.md @@ -0,0 +1,748 @@ +OPM Build System +================ + +This is the documentation for the build system used in various OPM modules. +In the following, `xxx` is used as a placeholder for the project name (e.g. +"core"). + +Unlike traditional CMake files which is highly imperative, OPM projects +sets up declarative lists of prerequisites and content and rely on convention +and pre-made modules to do the build. Its goal is to replace but be +compatible with the old autotools-based system. + +## Notation + +In the build system to following abstract locations are referred to: + + + + + +
LocationDescription
Source tree + +This is where the source files are located. Usually this directory is created +by a `git clone`. You edit files in this directory. The build system on the +other hand will never touch these files; they could be read-only for that +matter. It should be located on a disk that is backed up. The source trees +for various OPM modules should be siblings to eachother. + +
Build tree + +This is where you do `make` (or `ninja`), and the compiler/linker will put +its output here. It may be the same directory as the source tree (which is +then called an "in-tree build"). However, it is recommended that you keep +it separate. Do `make clean && make distclean` to remove all files that +are created by the build (if you put it in the source directory). +You don't need to backup these files (since they can be generated from the +source); instead this directory should be located somewhere with fast +write access. The build trees for various OPM modules should be siblings +(unless they are subdirectories in their source trees). + +
Installation tree + +This is where the build system will put all the final libraries and headers +when running `make install`. +You can specify another location for the installation tree by setting the +CMake variable `CMAKE_INSTALL_PREFIX` on the command line (or use `--prefix=` +with the configure script). Notice that the portion of this path which +will become the new filesystem root should be specified with the environment +variable `DESTDIR`. + +
+ +## Use Cases + +This section lists some common use cases for adding new code to a project +with respect to the build system, and lists the steps that must be undertaken +to do the necessary modifications. + +### Adding a Translation Unit + +1. Put the file in a sub-directory of `opm/xxx`. + +2. Add the file name to the `MAIN_SOURCE_FILES` list in `CMakeLists_files.txt`. + Please keep this list sorted. + +3. If you are adding new interfaces that will be used by client code, add the + header to the `PUBLIC_HEADER_FILES`. Note that any `_impl` headers containing + template implementations must also be included. + +### Adding a Prerequisite + +1. Add the name of the prerequisite module to the `opm-xxx_DEPS` list in the file + `cmake/Modules/opm-xxx-prereqs.cmake`, where xxx is a placeholder for the module + name of your CMake project. + +2. If you need any CMake configuration defines available in your public _headers_, + add these to the `opm-xxx_CONFIG_VAR` list in the same file. Please refrain + from this practice as it imposes a requirement on the clients of your code to + gather the same configuration information and make it available in the units + which uses your headers. + +### Adding a Unit Test + +1. Put the source code in a single translation unit in directory `tests`. The + name of this unit should start with `test_`. + +2. Put any datafiles this code rely on in the same directory. The code should + assume that such datafiles are available in the current directory the program + is running from. The code should not write to these files, but rather make + a copy if it needs to modify them. + +3. Add the file name to the `TEST_SOURCE_FILES` list in `CMakeLists_files.txt`. + +4. Add the datafiles to the `TEST_DATA_FILES` list in the same files. The + files will be copied from the source tree into the target tree. + +### Adding a New Utility Program + +1. Put the source code of the utility in the `examples` directory. + +2. Add the name of the translation unit to the `PROGRAM_SOURCE_FILES` list + in `CMakeLists_files.txt`. + +### Creating a New Module + +1. Copy the directory `cmake/` and all sub-directories from opm-core. This + directory contains the common build system, and should ideally be identical + across OPM projects. Also copy the file `configure` in the project root. + +2. Create project-specific files using those from another project as a template. + The list of project specific files is in the section + [Modules Reference](#project-specific-files) below. + +3. Create a new file `cmake/Modules/opm-xxx-prereqs.cmake`, using one of the + existing ones as a template. + +4. Optionally, create a new file `cmake/Modules/Findopm-xxx.cmake`, using one + of the existing ones as a template. + +## Options + +These options regulate the behaviour of the build system. In addition to these +options, you can also set standard CMake options, or options for the +prerequisites, which is not documented here. If you run the configure script +with the `--help` option, it will print a text of what the options are called +when using the autotools-compatible wrapper. + + + + + + + + + + + + + + + +
OptionDescription
BUILD_EXAMPLES + +Include the examples when doing a build. Whenever you change something +in the library, however small, all the examples will also be rebuilt. +Default is ON. + +
BUILD_TESTING + +Include the unit tests when doing a build. Whenever you change something +in the library, however small, all the unit tests will also be rebuilt. +Default is ON. + +
PRECOMPILE_HEADERS + +Precompile common headers into a binary blob which is loaded on further +compilations. If your compiler supports this, it usually reduces build +time. It does not affect the running time of the code. Default is OFF. + +
SIBLING_SEARCH + +Search for OPM/DUNE prerequisites in sibling directories of the build +tree. Default is ON. + +
SUITESPARSE_USE_STATIC + +Link SuiteSparse/UMFPack statically. Using this option will enable you +to build an executable which has no external dependencies. The default +is to use shared libraries if those are available. + +
SYSTEM_DEBUG + +Put debug symbols in the system debug directory (`/usr/lib/debug`) as +this seems to be the only place which is searched by default by GDB. +Default is OFF, as it requires that you have write access to that +directory. Note that if you are doing a system installation (set +CMAKE_INSTALL_PREFIX=/usr), then the libraries will be put in this +location irregardless of this option. + +
USE_MPI + +Enable the code to use MPI for parallelization. Default is OFF. +Note: It is important that OPM and DUNE modules is either all +compiled with MPI support or that none is. The build system will +attempt to recognize inconsistencies. + +
USE_OPENMP + +Enable the code to use OpenMP for parallelization. Default is ON. + +
USE_RUNPATH + +Remember the directories from where the prerequisites were found +when building. Default is ON, which enables you to run without +setting PATH all over the place in your build directories. When +creating an installation package, this should be set off. + +
USE_UNDERSCORING + +Assume that Fortran externals have an underscore suffix instead +of checking this with an actual compiler. If you set this option, +you can use Fortran libraries (notably BLAS and LAPACK) without +having a Fortran compiler installed. The default is OFF. + +
USE_VERSIONED_DIR + +Put libraries in a directory which includes the label of the project, +e.g. `/usr/lib/opm-core/2013.10`. Default is OFF. + +
WITH_NATIVE + +Optimize for the instruction set of the build machine. This is +a good idea if you are building the library on the same machine +as you will be using the library. Default is ON. + +
WHOLE_PROG_OPTIM + +Perform an extra round of optimization when linking the program. +(Usually the compiler only optimizes within the translation unit). +If your compiler supports this, it usually leads to a faster runtime. +Default is OFF. + +
+ +## Modules Reference + +### Project-specific Files + +All of these files are in the project root, except for `opm-xxx.m4` +which is in the `m4` directory. (`dunecontrol` always adds this +subdirectory for all the prerequisites listed in `dune.module`, to the +search path). + + + + + + + +
FileDescription
CMakeLists.txt + +Project-specific customizations to the build, such as filtering out source +files based on the availability of prerequisites, or adding configuration +variables only the implementation depends on. +Prefer to do customizations in the hooks available to this file rather than +adding ad-hoc code to the build system itself, to keep the `cmake/` directory +unified across projects. + +
CMakeLists_files.txt + +List of all compilation modules in the project, test cases and public +headers that should be installed in the distribution package. The contents +of these lists are distributed to project-specific variables by the build +system. + +
CTestConfig.cmake + +Settings for submitting result of tests to CDash. The default is setup +to submit to [the official CDash panel](http://www.opm-project.org/CDash/) +and does not need to be changed if your module has a panel there. + +
dune.module + +Information about the project such as name, release label, link version +and maintainer. Also specify dependencies to other OPM/DUNE-projects so +that dunecontrol can build in correct order. (Note that the full list of +dependencies is taken from opm-xxx-prereqs.cmake and not from here). +Since this file must be present before the build starts (for dunecontrol), +the version information is kept here. + +
opm_xxx.m4 + +Tell the generic opm.m4 module which name it should request pkg-config +for. This module is used by autotools-projects which link to OPM. +Notice that dashes is replaced by underscore in the filename to be +compatible with M4. (The actual name of the file doesn't matter to the +autotools build system). The contents of this file is mostly boiler-plate +where the names need to be changed to the project in question. (The +DUNE build system assumes the presence of macros based on the project +name). + +
+ +### Project Modules + +These modules contains the dependency information for this project, so +the build system can set up the prerequisite list correctly and probe +for other modules automatically. (This replaces hard-coded calls to +find_library in the CMakeLists.txt file). + + + + +
File (.cmake)Description
xxx-prereqs + +List prerequisite modules and defines used in public headers. Each module +must have such a "declaration", and this must be made available to every +other projects as well (which is why this is located in `cmake/Modules`). + +
Findxxx + +CMake modules which locates module `xxx` in the system directories. As +the `opm-xxx-config.cmake` is made available together with the libraries +and headers, these modules are not really needed (for OPM modules). + +
+ +### Generated Files + +These files are generated by the build system and exists in the _build_ tree, +not in the source tree. They are documented here to make developers aware of +their role in the build system. + + + + + + + + +
FileDescription
config.h + +Settings variables which the build system has configured and make available +to the source code. This file is **not** installed amongst the headers, so +you should never include this in a public header, even if you need the value +in one of these variables. Instead, you must rely on the client code to +configure this variable for you. + +
opm-xxx.pc + +pkg-config information file to locate the **build** tree. This is used by +the autotools build files, but can also be handy when manually building +small test programs for which you don't generate an own build system. + +
opm-xxx-config.cmake + +CMake information file to locate the **build** tree. This file is imported +when this project is set up as a prerequisite. + +
opm-xxx-install.pc + +pkg-config information file to locate the **installation** tree. It is +the same as `opm-xxx.pc` except that the paths are switched. When the +project is installed, this file is installed instead (under `lib/pkgconfig` +relative to the installation root). This directory should hence be put +in the search path to pkg-config to use the installed package. Before +installation, this file is worthless and should not be included, because +it does not refer to the build tree at all. (Be careful not to mix +the build and the installation tree). +Notice that the build system will forward a bunch of public definitions +which should be available to compile code referring to this library. + +
opm-xxx-install.cmake + +CMake information file to locate the **installation** tree. It is the +same as `opm-xxx-config.cmake` except that the paths are switched. When +the project is installed, this file is installed instead (under `share/cmake` +relative to the installation root). + +
opm-xxx-config-version.cmake + +CMake wants to include this into the build _before_ it is determined whether +the library was found successfully (depending on the version number perhaps), +so this information is put in its own file. Since it is the same for the +build tree and the installation tree, it is shared in both those locations. + +
+ +### Utility Modules + +These modules consists of useful routines which is not OPM-specific and +that could be used in any projects. They don't depend on any other parts +of the build system. + + + + + + +
File (.cmake)Description
AddOptions + +Functions to add options to compiler command line (e.g. 'CXXFLAGS'). +This macro can add options to more than one language and/or configuration +at a time, and also automatically removes duplicates. + +
ConfigVars + +Functions to write values of selected variables to `config.h`. The +advantage of using this compared to a template file, is that other +modules can add their own variables to be written (a project doesn't +need to know which variables a prerequisite wants to have in config.h). + +
DuneCompat + +Modify `Makefile` so dunecontrol can infer source directory from it. +dunecontrol infers the source location of prerequisites from textual +analysis of the Makefile in their build tree. (dunecontrol cannot build +with Ninja anyway, so that is not a problem). + +
Duplicates + +Functions to remove duplicate values from a list of libraries, which +must always be done from the beginning in order to link correctly. + +
LibtoolArchives + +Write .la file which will make libtool find our library. This enables +users of our library to use libtool even if we did not do so ourselves. + +
+ +### Build System Modules + +These are the modules which comprises the OPM-specific parts of the +build system. The overall flow through the stages of the build is best +captured by reading through the `OpmLibMain.cmake` module. + + + + + + + + + + + + + + + +
File (.cmake)Description
configure + +Wrapper script which emulates an autotools front-end, making the build +system usable with dunecontrol. There is one in the project root directory +which just forwards everything to the main script in `cmake/Scripts`. + +
OpmCompile + +Set up a compilation target for the library itself. It is assumed that +each OPM project build exactly one library file containing all its code. +The files and compiler options are passed through the project variables +(see the section [Variables Reference](#variables-reference) below). + +
OpmDefaults + +If optimization and debugging settings are not given on the command line, +supply a set of reasonable defaults for the detected platform and +compiler. + +
OpmDistClean + +Add a target (`make distclean`) to the build system which can remove the +build files themselves from the build directory tree. + +
OpmDoc + +Add target for building documentation, primarily Doxygen class reference +from the code. + +
OpmFiles + +Load list of files from `CMakeLists_files.txt` and put into the applicable +variables. + +
OpmGrid + +Adds the grid type selection code to config.h which is needed by dune-grid +if you want to set up a default grid. This is currently not needed by any +OPM project, and is provided only for porting client projects which previously +used this functionality from the autotools version. + +
OpmInit + +Read the version information and project name from `dune.module`. + +
OpmInstall + +Setup installation of the main library, public headers and debug symbols. + +
OpmKnown + +Marks as "used" all configuration variables which is used only by some of +the OPM projects, so they don't generate warnings in the rest of them. + +
OpmLibMain + +Driver module for the build process. First reads the list of prerequisites +and options, then set up the compiles and installations. + +
OpmProject + +Set up pkg-config and CMake information files (see [Generated Files] +(#generated-files)) for this project, based on configuration. + +
OpmSatellites + +Build test programs and examples for a library that is bundled in the project. +
+ +### Wrapper Modules + +These modules wrap the CMake `find_library` function and adds the information +retrieved from the imported prerequisite to module-specific variables, so that +these can be added to the build in batch afterwards. + + + + +
File (.cmake)Description
OpmFind + +Wrapper around `find_package`. Searches in various locations relative to this +project as well as in the system directories for a CMake module which can +locate the package. If it is found, adds the project variables (see +[Variables Reference](#variables-reference)) for this project into this one, +for instance include and library directories are added to the compile and link +command-line for this project. + +
OpmPackage + +Typical way of finding an OPM package; searches for the header and library, +and tries to compile a test program. This is the general implementation of +a CMake find module, and is used to locate those of the prerequisites that +fits the pattern. + +
+ +### Configuration Modules + +These are modules for altering the compiler and/or linker option in some way, +or get information from the system. They are not tied to the OPM projects. + + + + + + + + + + + + + + + + + +
File (.cmake)Description
UseCompVer + +Get the version of GCC that is used to compile the project. This is used in +other modules to enable features that are known to exist/work only in certain +versions of GCC. + +
UseDebugSymbols + +Set up the compile to generate debug symbols for the code. This is done also +if a release build was requested, to be able to do post-mortem debugging of +production code. (The debug symbols does not inhibit optimization). + +
UseDuneVer + +Retrieve the version of DUNE which is available. + +
UseDynamicBoost + +Determine if Boost is linked statically or dynamically (shared). This is +necessary to know for the unit tests. + +
UseFastBuilds + +Enable certain techniques which is known to speed up the build itself. + +
UseFortranWrappers + +Provide a macro for declaration of external symbols which is located in +Fortran libraries. It is not necessary to have a Fortran compiler present +to use this macro. + +
UseMultiArch + +Check if the system uses the multi-arch scheme for organizing libraries +(currently derivatives of Debian do this). + +
UseOnlyNeeded + +Only link to libraries which is actually used by the project. Some +platforms provide "under-linked" libraries (they need other libraries +but doesn't state so explicitly, but rather imply that the executable +must link to these itself), and this is also handled. + +
UseOpenMP + +Add OpenMP features to the build. Since OpenMP is activated by pragmas +in the code, compiler options instead of libraries are needed. + +
UseOptimization + +Compile with more extensive optimization that what is the default in +CMake. + +
UsePrecompHeaders + +Set up precompiled headers if the project has a `opm/xxx/opm-xxx-pch.hpp` +header. Due to problems across various compilers, this is currently an +opt-in feature. + +
UseSystemInfo + +Retrieve information about the system the build is performed on. This is +printed in the configuration log and can be helpful to troubleshoot +problems from error reports. + +
UseVCSInfo + +Retrieve information about which Git revision is compiled. This is useful +to figure out which version an error report refers to. + +
UseVersion + +Add version information for this project into the library binary, making +it available for query at runtime. + +
UseWarnings + +Enable a more extensive set of warnings to be reported by the compiler +than what is the default in CMake. + +
+ +## Variables Reference + +The build system will setup variables with names of the pattern `xxx_YYY` +where xxx is the project name (here including the suite; e.g. "opm-core") +and yyy is the suffix in the list below. The project name is used verbatim, +i.e. there is no translation of dashes and case ("opm-core" and not "OPM_CORE"). + + + + + + + + + + + + + + + + + + +
SuffixDescription
_DEFINITIONS + +Macro defines (of the type `-DFOO`) that needs to be added to the compile +of translation units contained in this library. This also includes defines +that must be present to headers which is included by this library. + +
_CONFIG_VARS + +Defines which should be present in `config.h` of the project which +includes this library (client code). Only the names of the variables +are listed here; the actual values must be found by the configuration +script of the client. + +
_CONFIG_IMPL_VARS + +Defines which should be present in `config.h` but is only used by +the internal code of the project itself. Use this list to get +defines without imposing a requirement on client code to also probe +for values. + +
_INCLUDE_DIR + +Directory where the public headers of this project are stored. + +
_INCLUDE_DIRS + +List of include directories that must be on the compiler search +path to compile code which uses this project. In addition to the +headers of this project itself, it also includes the transitive +closure of paths for all prerequisites as well. + +
_LABEL + +Currently for OPM projects, this follows a pattern of `YYYY.MM` +where YYYY is the year of the release and MM is the month. This +gives information to humans about how up to date this instance +of the library is (but doesn't provide a way to check for +compatibility, which is why the VERSION alternatives exist). + +
_LIBRARY + +Name and path of the binary to link with. + +
_LIBRARIES + +Full list of the library of both this project, and all its +prerequisites, that need to be included in the link. I.e. the +client code should only include the transitive list from its +immediate prerequisites and not know about the full dependency +graph. + +
_LIBRARY_DIRS + +Directories that should be added to the linker search path when +including this library. + +
_LINKER_FLAGS + +Flags that must be added to the link when including this library. + +
_SOURCES + +List of source files contained in this project. This enables libraries +to be distributed in source form (e.g. CJSON and TinyXML) and linked +directly into the project. + +
_TARGET + +Name of the library which is generated by this project. CMake and +autotools do not like library names which contains dashes, so they +are stripped out. By using a macro for this we are guaranteed uniform +translation. + +
_VERSION + +Textual concatenation of all components of the version number (see below) +with a dot inbetween. This form of version number can be compared using +CMake VERSION_{LESS|EQUAL|GREATER} operators. + +
_VERSION_MAJOR + +Major version of the library. If the major versions doesn't match, then +compatibility with existing code cannot be reckoned. + +
_VERSION_MINOR + +Minor version of the library. Libraries with newer minor version can +have more features, but should be able to run old code. + +
_VERSION_REVISION + +Micro version of the library. This number is generally incremented +whenever bugfixes or performance improvements are made. +
From 0a35670b7b88c7b2f35807db5675a1fa2da9321f Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 15 Jan 2014 09:08:00 +0100 Subject: [PATCH 07/26] Terminology instead of Notation as section header Notation implies that we are going to be given symbols which represents values or such (which arguably could be true since the path is a particular value, and from programming we are used to multi-letter symbols perhaps also with whitespace, but it's a stretch), but Terminology is more accurate, as this section describes fits the definition better: it is a vocabulary of technical terms. Hat tip: @bska --- cmake/OPM-CMake.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OPM-CMake.md b/cmake/OPM-CMake.md index 06a1183fc..18a69e3d2 100644 --- a/cmake/OPM-CMake.md +++ b/cmake/OPM-CMake.md @@ -10,7 +10,7 @@ sets up declarative lists of prerequisites and content and rely on convention and pre-made modules to do the build. Its goal is to replace but be compatible with the old autotools-based system. -## Notation +## Terminology In the build system to following abstract locations are referred to: From 5601eece73dd7cbc3699132996a6217f800a5621 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Sun, 15 Dec 2013 18:22:11 +0100 Subject: [PATCH 08/26] cmake: make sure all calls to message() exhibit a type --- cmake/Modules/FindSuperLU.cmake | 6 +++--- cmake/Modules/OpmPackage.cmake | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/FindSuperLU.cmake b/cmake/Modules/FindSuperLU.cmake index 41b886027..e8616989c 100644 --- a/cmake/Modules/FindSuperLU.cmake +++ b/cmake/Modules/FindSuperLU.cmake @@ -54,7 +54,7 @@ endif() # print message if there was still no blas found! if(NOT BLAS_FOUND AND NOT SUPERLU_BLAS_LIBRARY) - message("BLAS not found but required for SuperLU") + message(STATUS "BLAS not found but required for SuperLU") return() endif() list(APPEND CMAKE_REQUIRED_LIBRARIES "${SUPERLU_BLAS_LIBRARY}") @@ -69,7 +69,7 @@ if (NOT SUPERLU_INCLUDE_DIR) ) endif() if(NOT SUPERLU_INCLUDE_DIR) - message("Directory with the SuperLU include files not found") + message(STATUS "Directory with the SuperLU include files not found") return() endif() list(APPEND CMAKE_REQUIRED_INCLUDES "${SUPERLU_INCLUDE_DIR}") @@ -84,7 +84,7 @@ if (NOT SUPERLU_LIBRARY) ) endif() if(NOT SUPERLU_LIBRARY) - message("Directory with the SuperLU library not found") + message(STATUS "Directory with the SuperLU library not found") return() endif() list(APPEND CMAKE_REQUIRED_LIBRARIES "${SUPERLU_LIBRARY}") diff --git a/cmake/Modules/OpmPackage.cmake b/cmake/Modules/OpmPackage.cmake index 538fc4f32..3819ce748 100644 --- a/cmake/Modules/OpmPackage.cmake +++ b/cmake/Modules/OpmPackage.cmake @@ -344,11 +344,11 @@ macro (find_opm_package module deps header lib defs prog conf) if ((NOT (${module}_INCLUDE_DIR ${_and_lib_var} AND HAVE_${MODULE})) AND (_${module}_required OR NOT _${module}_quiet)) if (DEFINED ${module}_DIR) - message ("${module}_DIR = ${${module}_DIR}") + message (STATUS "${module}_DIR = ${${module}_DIR}") elseif (DEFINED ${module}_ROOT) - message ("${module}_ROOT = ${${module}_ROOT}") + message (STATUS "${module}_ROOT = ${${module}_ROOT}") elseif (DEFINED ${MODULE}_ROOT) - message ("${MODULE}_ROOT = ${${MODULE}_ROOT}") + message (STATUS "${MODULE}_ROOT = ${${MODULE}_ROOT}") endif (DEFINED ${module}_DIR) endif ((NOT (${module}_INCLUDE_DIR ${_and_lib_var} AND HAVE_${MODULE})) AND (_${module}_required OR NOT _${module}_quiet)) From 113162263d9956385dbadcee7a16a100c01c76fd Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Sun, 15 Dec 2013 17:56:37 +0100 Subject: [PATCH 09/26] OpmFind.cmake: prevent multiple calls to the same module in the same run this prevents to check for the same module more than once in the same cmake run and should thus speed things up a bit as well as make the output a bit cleaner. For this I assumed that the ${name}_FOUND cmake variable does not get cached, which it seems like it does not... --- cmake/Modules/OpmFind.cmake | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/OpmFind.cmake b/cmake/Modules/OpmFind.cmake index 2d9eceada..f7f1e186a 100644 --- a/cmake/Modules/OpmFind.cmake +++ b/cmake/Modules/OpmFind.cmake @@ -137,16 +137,19 @@ macro (find_and_append_package_to prefix name) # using config mode is better than using module (aka. find) mode # because then the package has already done all its probes and # stored them in the config file for us - if (NOT (${name}_FOUND OR ${NAME}_FOUND)) + if (NOT DEFINED ${name}_FOUND) if (${name}_DIR) message (STATUS "Finding package ${name} using config mode") find_package (${name} ${ARGN} NO_MODULE PATHS ${${name}_DIR} NO_DEFAULT_PATH) - else (${name}_DIR) + else () message (STATUS "Finding package ${name} using module mode") find_package (${name} ${ARGN}) - endif (${name}_DIR) - endif (NOT (${name}_FOUND OR ${NAME}_FOUND)) - endif (CMAKE_DISABLE_FIND_PACKAGE_${name}) + endif () + endif () + if (NOT ${name}_FOUND) + set (${name}_FOUND "0") + endif () + endif () # the variable "NAME" may be replaced during find_package (as this is # now a macro, and not a function anymore), so we must reinitialize From d9228403d41eada7cfce4c7f1d269a784d413f34 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Mon, 16 Dec 2013 09:29:06 +0100 Subject: [PATCH 10/26] OpmFind.cmake: also check for CAPITALIZED found variables thanks to @rolk for catching this --- cmake/Modules/OpmFind.cmake | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/OpmFind.cmake b/cmake/Modules/OpmFind.cmake index f7f1e186a..58501ba9d 100644 --- a/cmake/Modules/OpmFind.cmake +++ b/cmake/Modules/OpmFind.cmake @@ -137,7 +137,7 @@ macro (find_and_append_package_to prefix name) # using config mode is better than using module (aka. find) mode # because then the package has already done all its probes and # stored them in the config file for us - if (NOT DEFINED ${name}_FOUND) + if (NOT DEFINED ${name}_FOUND AND NOT DEFINED ${NAME}_FOUND) if (${name}_DIR) message (STATUS "Finding package ${name} using config mode") find_package (${name} ${ARGN} NO_MODULE PATHS ${${name}_DIR} NO_DEFAULT_PATH) @@ -146,8 +146,11 @@ macro (find_and_append_package_to prefix name) find_package (${name} ${ARGN}) endif () endif () - if (NOT ${name}_FOUND) - set (${name}_FOUND "0") + if (NOT DEFINED ${name}_FOUND) + set (${name}_FOUND "${${NAME}_FOUND}") + endif () + if (NOT DEFINED ${NAME}_FOUND) + set (${NAME}_FOUND "${${name}_FOUND}") endif () endif () From 8cbfaa3c14c443e03b06370bc9f72b1f62f31abd Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Fri, 24 Jan 2014 12:48:58 +0100 Subject: [PATCH 11/26] Create aliases for probed variables Headers from other libraries (notably DUNE) require definitions of other variables than our probe process set (e.g. HAVE_UMFPACK instead of HAVE_SUITESPARSE_UMFPACK_H). This module sets those aliases for compatibility. --- cmake/Modules/OpmAliases.cmake | 24 ++++++++++++++++++++++++ cmake/Modules/OpmLibMain.cmake | 3 +++ cmake/OPM-CMake.md | 6 ++++++ 3 files changed, 33 insertions(+) create mode 100644 cmake/Modules/OpmAliases.cmake diff --git a/cmake/Modules/OpmAliases.cmake b/cmake/Modules/OpmAliases.cmake new file mode 100644 index 000000000..06292137a --- /dev/null +++ b/cmake/Modules/OpmAliases.cmake @@ -0,0 +1,24 @@ +# - Alias probed variables for compatibility with DUNE buildsystem +# +# DUNE build system sets some variables which have different names +# in the CMake modules we are using; this module set those variable +# so they can be exported to config.h visible to DUNE headers + +function (set_aliases) + # hardcoded list of "dune-var opm-var" pairs, where the components + # are separated by space + set (aliases + ) + foreach (alias IN LISTS aliases) + # convert entry "X Y" into a list "X;Y", then pick apart + string (REGEX REPLACE "\ +" ";" tuple "${alias}") + list (GET tuple 0 var) + list (GET tuple 1 name) + + # write this alias to cache + set (${var} ${${name}} PARENT_SCOPE) + endforeach (alias) +endfunction (set_aliases) + +# always call this when the module is imported +set_aliases () diff --git a/cmake/Modules/OpmLibMain.cmake b/cmake/Modules/OpmLibMain.cmake index 535cd5ff5..7aef0322f 100644 --- a/cmake/Modules/OpmLibMain.cmake +++ b/cmake/Modules/OpmLibMain.cmake @@ -89,6 +89,9 @@ endif (COMMAND prereqs_hook) include (OpmFind) find_and_append_package_list_to (${project} ${${project}_DEPS}) +# set aliases to probed variables +include (OpmAliases) + # remove the dependency on the testing framework from the main library; # it is not possible to query for Boost twice with different components. list (REMOVE_ITEM "${project}_LIBRARIES" "${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}") diff --git a/cmake/OPM-CMake.md b/cmake/OPM-CMake.md index 18a69e3d2..c1f015d51 100644 --- a/cmake/OPM-CMake.md +++ b/cmake/OPM-CMake.md @@ -423,6 +423,12 @@ Wrapper script which emulates an autotools front-end, making the build system usable with dunecontrol. There is one in the project root directory which just forwards everything to the main script in `cmake/Scripts`. + + OpmAliases + +Copy variables which are probed by our find modules to the names which +are expected by DUNE. + OpmCompile From ab926cd82c2038dc9e80370d31b8b462b09caeeb Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Fri, 24 Jan 2014 13:26:52 +0100 Subject: [PATCH 12/26] Declare a need to know if UMFPACK is available Note that the variable HAVE_UMFPACK is not set by FindSuiteSparse, but by OpmAliases. --- cmake/Modules/Finddune-istl.cmake | 1 + cmake/Modules/OpmAliases.cmake | 1 + 2 files changed, 2 insertions(+) diff --git a/cmake/Modules/Finddune-istl.cmake b/cmake/Modules/Finddune-istl.cmake index 8c50d3d58..60f2201b0 100644 --- a/cmake/Modules/Finddune-istl.cmake +++ b/cmake/Modules/Finddune-istl.cmake @@ -49,6 +49,7 @@ int main (void) { HAVE_MPI; HAVE_PARMETIS; HAVE_SUPERLU; + HAVE_UMFPACK; SUPERLU_MIN_VERSION_4_3; SUPERLU_POST_2005_VERSION ") diff --git a/cmake/Modules/OpmAliases.cmake b/cmake/Modules/OpmAliases.cmake index 06292137a..4d298f183 100644 --- a/cmake/Modules/OpmAliases.cmake +++ b/cmake/Modules/OpmAliases.cmake @@ -8,6 +8,7 @@ function (set_aliases) # hardcoded list of "dune-var opm-var" pairs, where the components # are separated by space set (aliases + "HAVE_UMFPACK HAVE_SUITESPARSE_UMFPACK_H" ) foreach (alias IN LISTS aliases) # convert entry "X Y" into a list "X;Y", then pick apart From 0635670ac845598130ed786240d1da70c9bda61e Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Fri, 24 Jan 2014 13:57:16 +0100 Subject: [PATCH 13/26] Declare a need to know if BOOST is available Note that the variable HAVE_DUNE_BOOST is not set by FindBoost, but by OpmAliases. --- cmake/Modules/Finddune-common.cmake | 1 + cmake/Modules/OpmAliases.cmake | 1 + 2 files changed, 2 insertions(+) diff --git a/cmake/Modules/Finddune-common.cmake b/cmake/Modules/Finddune-common.cmake index 19717b40a..564aef547 100644 --- a/cmake/Modules/Finddune-common.cmake +++ b/cmake/Modules/Finddune-common.cmake @@ -50,6 +50,7 @@ int main (void) { HAVE_ARRAY; HAVE_BOOST_MAKE_SHARED_HPP; HAVE_BOOST_SHARED_PTR_HPP; + HAVE_DUNE_BOOST; HAVE_GMP; HAVE_MAKE_SHARED; HAVE_MPI; diff --git a/cmake/Modules/OpmAliases.cmake b/cmake/Modules/OpmAliases.cmake index 4d298f183..392749b9b 100644 --- a/cmake/Modules/OpmAliases.cmake +++ b/cmake/Modules/OpmAliases.cmake @@ -9,6 +9,7 @@ function (set_aliases) # are separated by space set (aliases "HAVE_UMFPACK HAVE_SUITESPARSE_UMFPACK_H" + "HAVE_DUNE_BOOST HAVE_BOOST" ) foreach (alias IN LISTS aliases) # convert entry "X Y" into a list "X;Y", then pick apart From ea9f088126880705728a07a40531575019b7e970 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Wed, 15 Jan 2014 13:15:13 +0100 Subject: [PATCH 14/26] Corrects required version and make Eigen3 download work. At least on Debian requiring version 3.1 of Eigen3 is not sufficient according to issue #25 the minimum version is 3.1.2. This patch fixes the required version. In addition it skips the REQUIRED option passed to find_package(Eigen3) to make the git download work. Fixes #25. --- cmake/Modules/opm-autodiff-prereqs.cmake | 30 ++++++++++++------------ 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/cmake/Modules/opm-autodiff-prereqs.cmake b/cmake/Modules/opm-autodiff-prereqs.cmake index 6fa6ab942..86fad9a34 100644 --- a/cmake/Modules/opm-autodiff-prereqs.cmake +++ b/cmake/Modules/opm-autodiff-prereqs.cmake @@ -3,21 +3,21 @@ # defines that must be present in config.h for our headers set (opm-autodiff_CONFIG_VAR - ) + ) # dependencies set (opm-autodiff_DEPS - # Compile with C99 support if available - "C99" - # Compile with C++0x/11 support if available - "CXX11Features" - # Various runtime library enhancements - "Boost 1.44.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" - # DUNE prerequisites - "dune-common REQUIRED; - dune-istl REQUIRED; - opm-core REQUIRED" - # Eigen - "Eigen3 3.1.2 REQUIRED" - ) + # Compile with C99 support if available + "C99" + # Compile with C++0x/11 support if available + "CXX11Features" + # Various runtime library enhancements + "Boost 1.39.0 + COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + # DUNE prerequisites + "dune-common REQUIRED; + dune-istl REQUIRED; + opm-core REQUIRED" + # Eigen + "Eigen3 3.1.2 " + ) From 7cc3a13c2cb59c7353426a3b62bd036dd12fb21a Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 6 Feb 2014 11:03:59 +0100 Subject: [PATCH 15/26] Makes arbitrary build subdirectories possible. Instead of guessing the suffix or subdir of the build directory, we now simply compare PROJECT_{BINARY,SOURCE]_DIR to detect it. By this e.g. opm-core/opm-parallel is a possible build directory, too. --- cmake/Modules/Findcjson.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/Findcjson.cmake b/cmake/Modules/Findcjson.cmake index fde5a7820..305f05b1d 100644 --- a/cmake/Modules/Findcjson.cmake +++ b/cmake/Modules/Findcjson.cmake @@ -31,13 +31,14 @@ if (CMAKE_SIZEOF_VOID_P) math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") endif (CMAKE_SIZEOF_VOID_P) +string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/?(.*)" "\\1" BUILD_DIR_SUFFIX "${PROJECT_BINARY_DIR}") + find_library (CJSON_LIBRARY NAMES "cjson" HINTS "${CJSON_ROOT}" PATHS "${PROJECT_BINARY_DIR}/../opm-parser" - "${PROJECT_BINARY_DIR}/../opm-parser-build" - "${PROJECT_BINARY_DIR}/../../opm-parser/build" - "${PROJECT_BINARY_DIR}/../../opm-parser/cmake-build" + "${PROJECT_BINARY_DIR}/../opm-parser${BUILD_DIR_SUFFIX}" + "${PROJECT_BINARY_DIR}/../../opm-parser/${BUILD_DIR_SUFFIX}" PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "opm/json" DOC "Path to cjson library archive/shared object files" From 991e909af9df079721b4ba9a1d03bd2030a9cc81 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 6 Feb 2014 12:41:10 +0100 Subject: [PATCH 16/26] Whitespace change that replaces introduced tab with spaces. --- cmake/Modules/Findcjson.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/Findcjson.cmake b/cmake/Modules/Findcjson.cmake index 305f05b1d..570557391 100644 --- a/cmake/Modules/Findcjson.cmake +++ b/cmake/Modules/Findcjson.cmake @@ -38,7 +38,7 @@ find_library (CJSON_LIBRARY HINTS "${CJSON_ROOT}" PATHS "${PROJECT_BINARY_DIR}/../opm-parser" "${PROJECT_BINARY_DIR}/../opm-parser${BUILD_DIR_SUFFIX}" - "${PROJECT_BINARY_DIR}/../../opm-parser/${BUILD_DIR_SUFFIX}" + "${PROJECT_BINARY_DIR}/../../opm-parser/${BUILD_DIR_SUFFIX}" PATH_SUFFIXES "lib" "lib${_BITS}" "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "opm/json" DOC "Path to cjson library archive/shared object files" From e99e9479274694a19d314ca6ca2103e39d40568f Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 6 Feb 2014 13:17:43 +0100 Subject: [PATCH 17/26] Support more arbitrary sibling/subdir build directories for opm-parser. --- cmake/Modules/Findopm-parser.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/cmake/Modules/Findopm-parser.cmake b/cmake/Modules/Findopm-parser.cmake index 5f2701ed0..67680015e 100644 --- a/cmake/Modules/Findopm-parser.cmake +++ b/cmake/Modules/Findopm-parser.cmake @@ -31,6 +31,10 @@ if ((NOT OPM_PARSER_ROOT) AND OPM_ROOT) set (OPM_PARSER_ROOT "${OPM_ROOT}/opm-parser") endif () +# Detect the build dir suffix or subdirectory +string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/?(.*)" "\\1" BUILD_DIR_SUFFIX "${PROJECT_BINARY_DIR}") + +message("PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} PROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} BUILD_DIR_SUFFIX=${BUILD_DIR_SUFFIX}") # if a root is specified, then don't search in system directories # or in relative directories to this one if (OPM_PARSER_ROOT) @@ -43,9 +47,8 @@ else () "${PROJECT_SOURCE_DIR}/../opm-parser") set (_opm_parser_build "${PROJECT_BINARY_DIR}/../opm-parser" - "${PROJECT_BINARY_DIR}/../opm-parser-build" - "${PROJECT_BINARY_DIR}/../../opm-parser/build" - "${PROJECT_BINARY_DIR}/../../opm-parser/cmake-build") + "${PROJECT_BINARY_DIR}/../opm-parser${BUILD_DIR_SUFFIX}" + "${PROJECT_BINARY_DIR}/../../opm-parser/${BUILD_DIR_SUFFIX}") endif () # use this header as signature @@ -82,6 +85,7 @@ if (CMAKE_SIZEOF_VOID_P) math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") endif (CMAKE_SIZEOF_VOID_P) +message("_opm_parser_build=${_opm_parser_build}") # these libraries constitute the parser core find_library (OPM_PARSER_LIBRARY NAMES "Parser" From 2fbe70e8a87e1e77660e2f50debd2824c779f395 Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 6 Feb 2014 13:21:23 +0100 Subject: [PATCH 18/26] Removed printf debugging messages --- cmake/Modules/Findopm-parser.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/Modules/Findopm-parser.cmake b/cmake/Modules/Findopm-parser.cmake index 67680015e..2698209f0 100644 --- a/cmake/Modules/Findopm-parser.cmake +++ b/cmake/Modules/Findopm-parser.cmake @@ -34,7 +34,6 @@ endif () # Detect the build dir suffix or subdirectory string(REGEX REPLACE "${PROJECT_SOURCE_DIR}/?(.*)" "\\1" BUILD_DIR_SUFFIX "${PROJECT_BINARY_DIR}") -message("PROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} PROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} BUILD_DIR_SUFFIX=${BUILD_DIR_SUFFIX}") # if a root is specified, then don't search in system directories # or in relative directories to this one if (OPM_PARSER_ROOT) @@ -85,7 +84,6 @@ if (CMAKE_SIZEOF_VOID_P) math (EXPR _BITS "8 * ${CMAKE_SIZEOF_VOID_P}") endif (CMAKE_SIZEOF_VOID_P) -message("_opm_parser_build=${_opm_parser_build}") # these libraries constitute the parser core find_library (OPM_PARSER_LIBRARY NAMES "Parser" From 769b9e8419e6fc05d9e1968bb879c24f99744dfe Mon Sep 17 00:00:00 2001 From: Markus Blatt Date: Thu, 6 Feb 2014 13:29:01 +0100 Subject: [PATCH 19/26] Do not use find_package in config mode for opm-parser. Currently opm-parser does not create opm-parser-config.cmake files. Therefore building with duncontrol fails as it sets opm-parser_DIR. With this patch we force CMake to always use module mode for finding which fixes this. --- cmake/Modules/OpmFind.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/Modules/OpmFind.cmake b/cmake/Modules/OpmFind.cmake index 58501ba9d..592a98307 100644 --- a/cmake/Modules/OpmFind.cmake +++ b/cmake/Modules/OpmFind.cmake @@ -59,6 +59,7 @@ set (_opm_proj_exemptions dune-istl dune-grid dune-geometry + opm-parser ) # although a DUNE module, it is delivered in the OPM suite From cd9012152d130efd662a139813d89e70b00b93da Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Thu, 15 Aug 2013 23:25:09 +0200 Subject: [PATCH 20/26] Provide dependency information for opm-benchmarks --- cmake/Modules/opm-benchmarks-prereqs.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 cmake/Modules/opm-benchmarks-prereqs.cmake diff --git a/cmake/Modules/opm-benchmarks-prereqs.cmake b/cmake/Modules/opm-benchmarks-prereqs.cmake new file mode 100644 index 000000000..7b754d967 --- /dev/null +++ b/cmake/Modules/opm-benchmarks-prereqs.cmake @@ -0,0 +1,15 @@ +# -*- 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-benchmarks_CONFIG_VAR + ) + +# dependencies +set (opm-benchmarks_DEPS + # compile with C++0x/11 support if available + "CXX11Features REQUIRED" + # OPM dependency + "opm-core" + "opm-upscaling" + ) From b9c4adff9e2454632fc47dc3d129ce4cfc0ec9bc Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Sat, 7 Sep 2013 23:11:32 +0200 Subject: [PATCH 21/26] Depend on Boost::iostreams The benchmark library uses Boost::iostreams to do decompression. Since we only scan for the Boost dependency once, this submodule is added to all of the projects in order to have a coherent dependency on Boost. --- cmake/Modules/dune-cornerpoint-prereqs.cmake | 2 +- cmake/Modules/opm-autodiff-prereqs.cmake | 2 +- cmake/Modules/opm-benchmarks-prereqs.cmake | 3 ++ cmake/Modules/opm-core-prereqs.cmake | 52 ++++++++++---------- cmake/Modules/opm-polymer-prereqs.cmake | 2 +- cmake/Modules/opm-porsol-prereqs.cmake | 2 +- cmake/Modules/opm-upscaling-prereqs.cmake | 2 +- cmake/Modules/opm-verteq-prereqs.cmake | 2 +- 8 files changed, 34 insertions(+), 33 deletions(-) diff --git a/cmake/Modules/dune-cornerpoint-prereqs.cmake b/cmake/Modules/dune-cornerpoint-prereqs.cmake index c7a0a358a..5b03c33ba 100644 --- a/cmake/Modules/dune-cornerpoint-prereqs.cmake +++ b/cmake/Modules/dune-cornerpoint-prereqs.cmake @@ -16,7 +16,7 @@ set (dune-cornerpoint_DEPS "CXX11Features" # various runtime library enhancements "Boost 1.39.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # DUNE dependency "dune-common REQUIRED; dune-grid REQUIRED; diff --git a/cmake/Modules/opm-autodiff-prereqs.cmake b/cmake/Modules/opm-autodiff-prereqs.cmake index 86fad9a34..f83413dfb 100644 --- a/cmake/Modules/opm-autodiff-prereqs.cmake +++ b/cmake/Modules/opm-autodiff-prereqs.cmake @@ -13,7 +13,7 @@ set (opm-autodiff_DEPS "CXX11Features" # Various runtime library enhancements "Boost 1.39.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # DUNE prerequisites "dune-common REQUIRED; dune-istl REQUIRED; diff --git a/cmake/Modules/opm-benchmarks-prereqs.cmake b/cmake/Modules/opm-benchmarks-prereqs.cmake index 7b754d967..465d10e5e 100644 --- a/cmake/Modules/opm-benchmarks-prereqs.cmake +++ b/cmake/Modules/opm-benchmarks-prereqs.cmake @@ -9,6 +9,9 @@ set (opm-benchmarks_CONFIG_VAR set (opm-benchmarks_DEPS # compile with C++0x/11 support if available "CXX11Features REQUIRED" + # various runtime library enhancements + "Boost 1.39.0 + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # OPM dependency "opm-core" "opm-upscaling" diff --git a/cmake/Modules/opm-core-prereqs.cmake b/cmake/Modules/opm-core-prereqs.cmake index 41419b15a..fb7b37c6d 100644 --- a/cmake/Modules/opm-core-prereqs.cmake +++ b/cmake/Modules/opm-core-prereqs.cmake @@ -3,33 +3,31 @@ # defines that must be present in config.h for our headers set (opm-core_CONFIG_VAR - HAVE_ERT - HAVE_SUITESPARSE_UMFPACK_H - ) + HAVE_ERT + HAVE_SUITESPARSE_UMFPACK_H + ) # dependencies set (opm-core_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" - # matrix library - "BLAS REQUIRED" - "LAPACK REQUIRED" - # Tim Davis' SuiteSparse archive - "SuiteSparse COMPONENTS umfpack" - # solver - "SuperLU" - # xml processing (for config parsing) - "TinyXML" - #Parser library - "opm-parser REQUIRED" - # Ensembles-based Reservoir Tools (ERT) - "ERT" - # DUNE dependency - "dune-common" - "dune-istl" - ) + # compile with C99 support if available + "C99" + # compile with C++0x/11 support if available + "CXX11Features REQUIRED" + # various runtime library enhancements + "Boost 1.39.0 + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" + # matrix library + "BLAS REQUIRED" + "LAPACK REQUIRED" + # Tim Davis' SuiteSparse archive + "SuiteSparse COMPONENTS umfpack" + # solver + "SuperLU" + # xml processing (for config parsing) + "TinyXML" + # Ensembles-based Reservoir Tools (ERT) + "ERT" + # DUNE dependency + "dune-common" + "dune-istl" + ) diff --git a/cmake/Modules/opm-polymer-prereqs.cmake b/cmake/Modules/opm-polymer-prereqs.cmake index e34a37de3..68f52ec01 100644 --- a/cmake/Modules/opm-polymer-prereqs.cmake +++ b/cmake/Modules/opm-polymer-prereqs.cmake @@ -13,7 +13,7 @@ set (opm-polymer_DEPS "CXX11Features" # various runtime library enhancements "Boost 1.39.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # Ensembles-based Reservoir Tools "ERT" # OPM dependency diff --git a/cmake/Modules/opm-porsol-prereqs.cmake b/cmake/Modules/opm-porsol-prereqs.cmake index 01280c7c3..cc0b192b5 100644 --- a/cmake/Modules/opm-porsol-prereqs.cmake +++ b/cmake/Modules/opm-porsol-prereqs.cmake @@ -13,7 +13,7 @@ set (opm-porsol_DEPS "CXX11Features" # various runtime library enhancements "Boost 1.39.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # DUNE dependency "dune-common REQUIRED; dune-istl REQUIRED; diff --git a/cmake/Modules/opm-upscaling-prereqs.cmake b/cmake/Modules/opm-upscaling-prereqs.cmake index c55bc130b..b6f42eed3 100644 --- a/cmake/Modules/opm-upscaling-prereqs.cmake +++ b/cmake/Modules/opm-upscaling-prereqs.cmake @@ -14,7 +14,7 @@ set (opm-upscaling_DEPS "CXX11Features" # various runtime library enhancements "Boost 1.39.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # matrix library "BLAS REQUIRED" "LAPACK REQUIRED" diff --git a/cmake/Modules/opm-verteq-prereqs.cmake b/cmake/Modules/opm-verteq-prereqs.cmake index 6b3b74419..1b111a2ef 100644 --- a/cmake/Modules/opm-verteq-prereqs.cmake +++ b/cmake/Modules/opm-verteq-prereqs.cmake @@ -13,7 +13,7 @@ set (opm-verteq_DEPS "CXX11Features" # various runtime library enhancements "Boost 1.39.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # OPM dependency "opm-core" ) From 41032a8ee481abb1a74c13fefebc69ec78bd573d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 28 Feb 2014 18:29:19 +0100 Subject: [PATCH 22/26] Uniformly raise Boost version requirement to 1.44 Commit 70505ff raised opm-core's "Boost" requirement to version 1.44 in order to reflect the requirements of the opm-parser module. This commit propagates that requirement to all other known modules. --- cmake/Modules/dune-cornerpoint-prereqs.cmake | 2 +- cmake/Modules/opm-autodiff-prereqs.cmake | 2 +- cmake/Modules/opm-benchmarks-prereqs.cmake | 2 +- cmake/Modules/opm-core-prereqs.cmake | 2 +- cmake/Modules/opm-polymer-prereqs.cmake | 2 +- cmake/Modules/opm-porsol-prereqs.cmake | 2 +- cmake/Modules/opm-upscaling-prereqs.cmake | 2 +- cmake/Modules/opm-verteq-prereqs.cmake | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmake/Modules/dune-cornerpoint-prereqs.cmake b/cmake/Modules/dune-cornerpoint-prereqs.cmake index 5b03c33ba..f06134c0d 100644 --- a/cmake/Modules/dune-cornerpoint-prereqs.cmake +++ b/cmake/Modules/dune-cornerpoint-prereqs.cmake @@ -15,7 +15,7 @@ set (dune-cornerpoint_DEPS # compile with C++0x/11 support if available "CXX11Features" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # DUNE dependency "dune-common REQUIRED; diff --git a/cmake/Modules/opm-autodiff-prereqs.cmake b/cmake/Modules/opm-autodiff-prereqs.cmake index f83413dfb..101e2f1fb 100644 --- a/cmake/Modules/opm-autodiff-prereqs.cmake +++ b/cmake/Modules/opm-autodiff-prereqs.cmake @@ -12,7 +12,7 @@ set (opm-autodiff_DEPS # Compile with C++0x/11 support if available "CXX11Features" # Various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # DUNE prerequisites "dune-common REQUIRED; diff --git a/cmake/Modules/opm-benchmarks-prereqs.cmake b/cmake/Modules/opm-benchmarks-prereqs.cmake index 465d10e5e..330774a8d 100644 --- a/cmake/Modules/opm-benchmarks-prereqs.cmake +++ b/cmake/Modules/opm-benchmarks-prereqs.cmake @@ -10,7 +10,7 @@ set (opm-benchmarks_DEPS # compile with C++0x/11 support if available "CXX11Features REQUIRED" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # OPM dependency "opm-core" diff --git a/cmake/Modules/opm-core-prereqs.cmake b/cmake/Modules/opm-core-prereqs.cmake index fb7b37c6d..e8f2135ad 100644 --- a/cmake/Modules/opm-core-prereqs.cmake +++ b/cmake/Modules/opm-core-prereqs.cmake @@ -14,7 +14,7 @@ set (opm-core_DEPS # compile with C++0x/11 support if available "CXX11Features REQUIRED" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # matrix library "BLAS REQUIRED" diff --git a/cmake/Modules/opm-polymer-prereqs.cmake b/cmake/Modules/opm-polymer-prereqs.cmake index 68f52ec01..8a17e0789 100644 --- a/cmake/Modules/opm-polymer-prereqs.cmake +++ b/cmake/Modules/opm-polymer-prereqs.cmake @@ -12,7 +12,7 @@ set (opm-polymer_DEPS # compile with C++0x/11 support if available "CXX11Features" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # Ensembles-based Reservoir Tools "ERT" diff --git a/cmake/Modules/opm-porsol-prereqs.cmake b/cmake/Modules/opm-porsol-prereqs.cmake index cc0b192b5..1f88e0bb0 100644 --- a/cmake/Modules/opm-porsol-prereqs.cmake +++ b/cmake/Modules/opm-porsol-prereqs.cmake @@ -12,7 +12,7 @@ set (opm-porsol_DEPS # compile with C++0x/11 support if available "CXX11Features" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # DUNE dependency "dune-common REQUIRED; diff --git a/cmake/Modules/opm-upscaling-prereqs.cmake b/cmake/Modules/opm-upscaling-prereqs.cmake index b6f42eed3..463749010 100644 --- a/cmake/Modules/opm-upscaling-prereqs.cmake +++ b/cmake/Modules/opm-upscaling-prereqs.cmake @@ -13,7 +13,7 @@ set (opm-upscaling_DEPS # compile with C++0x/11 support if available "CXX11Features" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # matrix library "BLAS REQUIRED" diff --git a/cmake/Modules/opm-verteq-prereqs.cmake b/cmake/Modules/opm-verteq-prereqs.cmake index 1b111a2ef..d69ca4808 100644 --- a/cmake/Modules/opm-verteq-prereqs.cmake +++ b/cmake/Modules/opm-verteq-prereqs.cmake @@ -12,7 +12,7 @@ set (opm-verteq_DEPS # compile with C++0x/11 support if available "CXX11Features" # various runtime library enhancements - "Boost 1.39.0 + "Boost 1.44.0 COMPONENTS date_time filesystem system iostreams unit_test_framework REQUIRED" # OPM dependency "opm-core" From 8314ea35953c357e3c2ce6c2aa01a3c4b0a45ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 28 Feb 2014 19:06:42 +0100 Subject: [PATCH 23/26] Reformat prerequisite file according to convention This commit makes a few adjustments to the white-space of file 'opm-parser-prereqs.cmake' to honour the conventions of the other *-prereqs.cmake files within the OPM project's module suites. No functional changes. --- cmake/Modules/opm-parser-prereqs.cmake | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/cmake/Modules/opm-parser-prereqs.cmake b/cmake/Modules/opm-parser-prereqs.cmake index 521568b78..47c77ae96 100644 --- a/cmake/Modules/opm-parser-prereqs.cmake +++ b/cmake/Modules/opm-parser-prereqs.cmake @@ -3,16 +3,17 @@ # defines that must be present in config.h for our headers set (opm-parser_CONFIG_VAR - HAVE_ERT - ) + HAVE_ERT + ) # dependencies set (opm-parser_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" - "cJSON" - ) + # compile with C99 support if available + "C99" + # compile with C++0x/11 support if available + "CXX10Features REQUIRED" + # various runtime library enhancements + "Boost 1.44.0 + COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + "cJSON" + ) From dfe457624eaef5c12e16e527683354a68d71b36f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 28 Feb 2014 19:13:46 +0100 Subject: [PATCH 24/26] Depend on Boost.Iostreams The benchmark library uses Boost::iostreams to do decompression. Since we only scan for the Boost dependency once, this submodule is added to all of the projects in order to have a coherent dependency on Boost. --- cmake/Modules/opm-parser-prereqs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/opm-parser-prereqs.cmake b/cmake/Modules/opm-parser-prereqs.cmake index 47c77ae96..fca8f2481 100644 --- a/cmake/Modules/opm-parser-prereqs.cmake +++ b/cmake/Modules/opm-parser-prereqs.cmake @@ -14,6 +14,6 @@ set (opm-parser_DEPS "CXX10Features REQUIRED" # various runtime library enhancements "Boost 1.44.0 - COMPONENTS date_time filesystem system unit_test_framework REQUIRED" + COMPONENTS date_time filesystem system iostream unit_test_framework REQUIRED" "cJSON" ) From 9329d652fdbe6fe0f00a3ddff3215938e8537b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 28 Feb 2014 20:00:44 +0100 Subject: [PATCH 25/26] Fix mis-merge. In propagating the requirements for opm-benchmarks to the other modules I accidentally removed the 'opm-parser' prerequisite (see commit 86439d6 for details). This commit restores that prerequisite. --- cmake/Modules/opm-core-prereqs.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Modules/opm-core-prereqs.cmake b/cmake/Modules/opm-core-prereqs.cmake index e8f2135ad..58b627e30 100644 --- a/cmake/Modules/opm-core-prereqs.cmake +++ b/cmake/Modules/opm-core-prereqs.cmake @@ -25,6 +25,8 @@ set (opm-core_DEPS "SuperLU" # xml processing (for config parsing) "TinyXML" + #Parser library + "opm-parser REQUIRED" # Ensembles-based Reservoir Tools (ERT) "ERT" # DUNE dependency From e63a3965799ecf73fd4f1578065a0944b036826c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A5rd=20Skaflestad?= Date: Fri, 28 Feb 2014 22:07:27 +0100 Subject: [PATCH 26/26] Restore C++-11 checks While reformatting the parser-prereqs file I accidentally replaced the feature search 'CXX11Features' with 'CXX10Features'. This commit fixes that blunder. --- cmake/Modules/opm-parser-prereqs.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/Modules/opm-parser-prereqs.cmake b/cmake/Modules/opm-parser-prereqs.cmake index fca8f2481..6cf975b9e 100644 --- a/cmake/Modules/opm-parser-prereqs.cmake +++ b/cmake/Modules/opm-parser-prereqs.cmake @@ -11,7 +11,7 @@ set (opm-parser_DEPS # compile with C99 support if available "C99" # compile with C++0x/11 support if available - "CXX10Features REQUIRED" + "CXX11Features REQUIRED" # various runtime library enhancements "Boost 1.44.0 COMPONENTS date_time filesystem system iostream unit_test_framework REQUIRED"