Commit Graph

47 Commits

Author SHA1 Message Date
Joakim Hove
99e5fa4e25 Using external cmake modules 2015-05-08 11:55:40 +02:00
Arne Morten Kvarving
4d9ae70ba2 fixed: pkgconfig file
multiarch had not been setup and the _TARGET variable is not set
in this build system.
2015-04-23 10:49:22 +02:00
Joakim Hove
b9545b865c FindERT.cmake: Look for libecl_well library 2014-12-08 13:06:16 +01:00
Arne Morten Kvarving
870cf4514b added: cmake config mode and pkgconfig 2014-11-18 11:10:07 +01:00
Arne Morten Kvarving
303b9bc885 changed: cjson handling
- probe only for system lib (i.e. only probe in prefix paths)
old code ended up not installing the json lib due to finding a copy
in the build folder if a reconfiguration was performed.

- build internal copy static and bundle in libopm-json.so
no reason to install this as a shared library. if it is updated
originating from opm, the entire parser library is updated anyways.
2014-11-18 10:27:03 +01:00
Andreas Lauser
e06114c35a make the regex test more thorough
it seems like the std::regex delivered up to gcc 4.8 has problems with
constructs such as ".+". (at least if they appear at the end of a
regex...)
2014-08-08 16:13:00 +02:00
Andreas Lauser
37df21ed41 ERT: link to the threads library of the OS
this is required to make the opm-core build succeed if ERT was build
with -DBUILD_SHARED_LIBS=OFF . (without it, I get errors like

    /home/and/src/ert/devel/libert_util/src/thread_pool_posix.c:328: error: undefined reference to 'pthread_create'
2014-07-30 14:54:38 +02:00
Arne Morten Kvarving
ffd2eb1d73 fixed: ERT depends on libdl
this issue was triggered with static libs for ERT
2014-07-25 15:07:39 +02:00
Andreas Lauser
3dac72d821 use extended regular expressions in the test for std::regex
for some compilers (e.g., GCC < 4.9) the default is buggy and
opm-parser thus uses extended expressions...

thanks to [at]bska for digging this up!
2014-07-08 13:01:20 +02:00
Andreas Lauser
1a72cade01 use std::regex if it is available
it turns out that boost::regex does not work for the libstdc++ debug
mode. This patch should fix this for sufficiently new compilers.

Note that this requires the FindCXX11Features.cmake tests pulled in
from opm-core and an additional compiler flag...
2014-07-07 17:50:46 +02:00
Andreas Lauser
ed4a1d3e09 add the boost::regex library as a prerequisite
this is required for regex-matching keywords. Once GCC 4.9 is the
minimum compiler version to be supported, this can be dropped in favor
of std::regex ...
2014-06-29 13:40:09 +02:00
Andreas Lauser
480e17e5b6 syncronize Findopm-parser.cmake with the opm-core version
the ERT libraries and headers were missing and a few other minor
cleanups. see https://github.com/OPM/opm-core/pull/601 for details.
2014-06-27 10:55:08 +02:00
Andreas Lauser
fc43fdd427 add a cmake test to check if the used file system is case sensitive
And fix the unit test for INCLUDE. This should make the test pass on
case insensitive file systems like the one of MacOS X. (Who uses that
anyway? ;))
2014-04-23 14:56:27 +02:00
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
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