Commit Graph

35 Commits

Author SHA1 Message Date
Joakim Hove
df7244418f Added ERT dependency in build of opm-parser. 2014-03-31 14:18:05 +02:00
Bård Skaflestad
57f34f2ab7 Restore C++-11 checks
While reformatting the parser-prereqs file I accidentally replaced
the feature search 'CXX11Features' with 'CXX10Features'.  This
commit fixes that blunder.
2014-02-28 22:17:13 +01:00
Bård Skaflestad
600a07f7e2 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.
2014-02-28 19:21:33 +01:00
Bård Skaflestad
97980cb37f 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.
2014-02-28 19:21:27 +01:00
Markus Blatt
52da1a7838 [PATCH] [cmake] 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.
2014-02-06 11:16:00 +01:00
Andreas Lauser
5eb76e9062 make the module buildable using dunecontrol 2013-12-10 16:12:39 +01:00
Joakim Hove
a74375a62f Added CJSON_INCLUDE_DIR to the OPM_PARSER_INCLUDE_DIR variable 2013-11-15 15:28:03 +01:00
Joakim Hove
e23bb8f290 Added cJSON as a not required dependency in the list of opm-parser depencies 2013-11-15 13:03:14 +01:00
Kristian Flikka
33b0bed250 Changed the test-program to include Deck.hpp in stead of Parser.hpp to avoid problem with cJSON.h 2013-10-30 10:27:39 +01:00
Joakim Hove
02c410e9af Merge pull request #39 from rolk/039_src
Extract source location from cache in build tree
2013-10-28 02:06:18 -07:00
Joakim Hove
039f6ea4cf Merge pull request #36 from joakim-hove/cmake-package-config
Cmake package config
2013-10-28 01:00:03 -07:00
Roland Kaufmann
e8e8d1c21e Extract source location from cache in build tree
If opm-parser_ROOT is given, this should point to a build tree. The
only way to extract the corresponding source directory is to parse
the build cache located there.
2013-10-24 09:40:36 +02:00
Roland Kaufmann
940f31295b Test for all the required header directories 2013-10-23 22:40:45 +02:00
Roland Kaufmann
7e9c45b765 Allow package to be specified as required
Although CMake prefers the uppercase variant variables, and the
find_package_handle_standard_args will convert to them for us, the
part that parses REQUIRED and QUIET arguments to find_package still
only uses the package name verbatim (sic).
2013-10-23 22:40:45 +02:00
Roland Kaufmann
bb4fffc227 Don't search relative directories if root is given
The PATHS that are specified is always searched, also if NO_DEFAULT_PATH
is given.
2013-10-23 22:40:45 +02:00
Roland Kaufmann
8ac1062968 Allow lowercase variables for specifying project root 2013-10-23 22:40:45 +02:00
Roland Kaufmann
b1f6e665c1 Search for headers relative to project root
The find module may be called from a CMakeLists.txt in a subdirectory,
and it would start the search from there.
2013-10-23 22:40:45 +02:00
Joakim Hove
f6aa9af881 Added install-headers function + opm-parser-prereqs.cmake 2013-10-23 18:12:35 +02:00
Joakim Hove
987d5c4a71 Changed Findcjson.cmake to use OPM_PARSER_ROOT as prefix - if CJSON_ROOT has not been set 2013-10-23 17:56:35 +02:00
Joakim Hove
0b3a4d64ec Merge branch 'master' into cmake-package-config 2013-10-23 17:23:46 +02:00
Joakim Hove
069cd2b8c9 Merge pull request #35 from rolk/035_cmake
Provide find module for OPM Parser library
2013-10-23 07:48:29 -07:00
Roland Kaufmann
173df1f166 Include standard CMake module to get error handling 2013-10-23 14:34:25 +02:00
Roland Kaufmann
8642f5e253 Include standard CMake module to get error handling 2013-10-23 14:32:40 +02:00
Roland Kaufmann
c698136b51 Define uppercase version of found-variable
It doesn't really matter here because "cjson" is only letters, but as
a general rule we define the uppercase variant ourselves so that CMake
doesn't use its own (bizarre) case rules, and then set the lower case
explicitly afterwards.
2013-10-23 11:37:16 +02:00
Roland Kaufmann
0cbed21e5a Define uppercase variant when testing for existence
CMake will do some uppercasing of its own (defining OPM-PARSER_FOUND)
so it works best if we specify the correct uppercase version and sets
the lowercase afterwards.
2013-10-23 11:35:19 +02:00
Roland Kaufmann
e823803474 Provide find module for OPM Parser library
Searches for headers and objects of the library as well as finding
the prerequisites (Boost and CJSON) necessary to link a program.
2013-10-23 11:12:35 +02:00
Roland Kaufmann
d537acf16f Correct documentation typo 2013-10-23 11:06:13 +02:00
Roland Kaufmann
9f8ac9a963 Set plural form of header dir. var.
Even though we only look for one directory, the convention is to always
have the full set of prerequisites in the plural form.
2013-10-23 11:05:22 +02:00
Roland Kaufmann
47934fd678 Look in lib64/ for x86_64 libs on RHEL(-like) distro 2013-10-23 10:44:35 +02:00
Roland Kaufmann
9d4cd49427 Use math library as a prerequisite (on Linux)
It is needed for pow() and floor() functions.
2013-10-23 10:22:50 +02:00
Roland Kaufmann
2b52adadf2 Search for build tree relative to this project
The CMake script is run in the source tree. We assume a certain
directory layout and that the cjson is available in a sibling
directory of this project. Thus, we can pick up a build tree without
having the library installed.
2013-10-23 10:22:50 +02:00
Roland Kaufmann
9663d187a7 Search for library in proper build directory
The library will end up in the opm/json library in a build tree; we
want to be able to point the CJSON_ROOT variable to the root of the
build tree and have it pick up the libraries from there.
2013-10-23 10:22:50 +02:00
Roland Kaufmann
1b4a71bdfb Raise error if module is required but not found
Otherwise the error will just be silently ignored.
2013-10-23 10:22:49 +02:00
Joakim Hove
d5a78e3232 Added function install_headers() which will retain header prefix path 2013-10-21 17:13:37 +02:00
Joakim Hove
71dd19d11c Added cmake machinery to find cjson library; and build bundled version if find_package(cjson) fails. 2013-08-29 12:05:18 +02:00