Commit Graph

156 Commits

Author SHA1 Message Date
Roland Kaufmann
e75d69ef1d Use config mode if possible when finding packages 2013-03-05 22:29:20 +01:00
Roland Kaufmann
11bf7bf34e Propagate information about whether module was found quietly 2013-03-05 13:58:19 +01:00
Roland Kaufmann
e50c564425 Separate inclusion of OpenMP library into reusable module
Other projects (which does not have a direct dependency on ERT) require
OpenMP; we desire to reuse this functionality into those projects.
2013-03-05 13:52:52 +01:00
Roland Kaufmann
911bf9593f Do not duplicate handling of duplicate libraries
There were (at least) three implementations of the same macro; these
have been collected into a separate helper module. (Note that this
means that FindERT is now not completely stand-alone anymore).
2013-03-05 13:50:58 +01:00
Roland Kaufmann
f3b76ac8e3 Trim same amount from strings before comparing
If you specified options in an environment variable containing a blank
at the end, then this would not compare equal to the other candidate,
which was stripped, causing the first added argument to drop out! This
is usually the flag for C++11 compliance, causing binary incompatibility
2013-03-05 11:43:06 +01:00
Atgeirr Flø Rasmussen
0ac31dd871 Merge pull request #166 from rolk/166_upcase
Use uppercase consistently in configuration variable names
2013-03-05 00:49:33 -08:00
Atgeirr Flø Rasmussen
f44db76a72 Merge pull request #169 from rolk/169_havetest
Check that test prog. compiled before declared found
2013-03-05 00:40:40 -08:00
Roland Kaufmann
3febb086dc Check that test prog. compiled before declared found
The previous version did the test and setting of the config variable
right, but reported that the module was found only if the files were
located, independently of the result of the compile.
2013-03-04 23:41:41 +01:00
Roland Kaufmann
3c5a73e9c4 Reuse the uppercase variant across the entire function 2013-03-04 23:33:30 +01:00
Roland Kaufmann
3bc25d5dee Also clean the temporary config-var file 2013-03-04 23:11:52 +01:00
Roland Kaufmann
be9b33e687 Use uppercase for the shared-object variable as well 2013-03-04 21:58:36 +01:00
Roland Kaufmann
5f490648ab Allow common _ROOT suffix in addition to original _PREFIX 2013-03-04 21:30:23 +01:00
Roland Kaufmann
76786442ce Allow uppercase variant of package root also
Both the straight-forward mod-ule_ROOT variable and the more idiomatic
MOD_ULE_ROOT variant are allowed when specifying where to look for a
package.
2013-03-04 21:25:18 +01:00
Roland Kaufmann
4942763ddd Use temp file for config vars to avoid rebuild
When generating the config.h configuration file, write to a temporary
first and then rename afterward to avoid touching the file and thus
triggering a complete rebuild (of everything that includes config.h)
unnecessarily.
2013-03-04 14:00:06 +01:00
Roland Kaufmann
234be65229 Specify source files explicitly rather than with glob
Files which constitutes compilation units are now specified explicitly
in the file CMakeLists_files.cmake rather than identified through a
glob. If this file is updated, a reconfigure should be triggered.

This also enables us to specify exactly which headers that should be
distributed as part of the installation package, and which programs
that should be used for unit testing.
2013-03-04 12:25:20 +01:00
Roland Kaufmann
e3a9a40ae6 Find module for opm-polymer 2013-03-04 09:46:33 +01:00
Roland Kaufmann
11d5f9aa91 Find module for opm-upscaling 2013-03-04 09:46:33 +01:00
Roland Kaufmann
1c93c19bf9 Find module for opm-porsol 2013-03-04 09:46:33 +01:00
Roland Kaufmann
dda6155081 Find module for dune-cornerpoint 2013-03-04 09:46:33 +01:00
Roland Kaufmann
6a2323c34a Provide easy way to disable an entire directory 2013-03-04 09:46:33 +01:00
Roland Kaufmann
8b13ffee6b Only attempt to use precompiled headers that exists 2013-03-04 09:46:33 +01:00
Roland Kaufmann
a35e0d23e3 Probe with include dirs to ALL dependencies
It may be that the header in the test is dependent on some other header
in one of the dependencies.
2013-03-04 09:46:33 +01:00
Roland Kaufmann
7ef129d708 Allow optional packages in find-module package list 2013-03-04 09:46:33 +01:00
Roland Kaufmann
39880c255e Updated dependencies (most notably LibXML2 -> TinyXML) 2013-03-04 09:46:32 +01:00
Roland Kaufmann
dc3d94e985 Activate Fortran interface on demand
Not only if we need to compile Fortran code, but also if we need to call
some functions from a Fortran library from C code.
2013-03-04 09:46:32 +01:00
Roland Kaufmann
7871a48551 Make sure HAVE_FOO is defined if foo_FOUND in CMake 2013-03-04 09:46:32 +01:00
Roland Kaufmann
03ccc506bd Find modules for dune-geometry and dune-grid 2013-03-04 09:46:32 +01:00
Roland Kaufmann
d9980beef1 Guess where libraries are using full path
Because the probe is run from the project source tree(!)
2013-03-04 09:46:32 +01:00
Roland Kaufmann
ad2a604026 Use generic names in other files also
Reduce the number of files that must be customized when starting new
projects.
2013-02-22 11:08:57 +01:00
Roland Kaufmann
528a8e42f6 Specify source directory at the highest level
Some projects also have side directories for utilities etc.
2013-02-22 09:58:19 +01:00
Roland Kaufmann
c16864e7a5 Allow more variety in unit test program file names
They can now be called test_*.cpp or *_test.cpp
2013-02-22 09:58:19 +01:00
Roland Kaufmann
77d214be8e Correct mixup between option and cache variables
Options are boolean flags that are stored... in the cache, whereas
cache variables are also stored in the cache, but can have a variety
of types (including booleans). It was possible to confuse the two,
because if you set it as a variable on the command line, it will
override both.
2013-02-22 09:58:19 +01:00
Roland Kaufmann
dfc9f70ee0 Consider directory itself to be part of datafiles
Previously the directory name was just entered as part of a glob; the
new version uses the satellite name as a directory and also makes sure
that this directory is available to run tests in, even if there are no
datafiles (the directory itself is now considered a datafile)
2013-02-22 09:58:18 +01:00
Roland Kaufmann
67e69c811f Only copy Doxygen stylesheet if it actually exists 2013-02-22 09:58:18 +01:00
Roland Kaufmann
192e4595a5 Rename docu_dir -> doxy_dir to reflect its purpose 2013-02-22 09:58:18 +01:00
Roland Kaufmann
5810819b95 Allow some template files to keep their Autotools dirs
By using the abs_top_{build,src}dir variables, template files can
co-exist between Autotools and CMake build systems.
2013-02-21 10:24:21 +01:00
Roland Kaufmann
8a5de432e8 Split Doxyfile into a template and a customization part
Most of the file is not changed from some sensible default anyway, so we
can store this in the template directory and have a much more manageable
local file which just contains the relevant changes.
2013-02-21 10:24:21 +01:00
Roland Kaufmann
cc3987d090 Allow for a project to not have any test cases 2013-02-21 10:24:21 +01:00
Roland Kaufmann
01fc743d41 Only write message if operation actually performed
Wording of the message was so that one could believe that a libtool
archive had been written even though it had not.
2013-02-20 23:55:26 +01:00
Roland Kaufmann
0db4d63bb0 Provide all config vars to test probes systematically
Generate a list of compiler options that does the defines in the same
manner that it would for config.h
2013-02-20 23:49:04 +01:00
Bård Skaflestad
5e6806a1de Merge pull request #156 from rolk/156_docdir
Allow documentation to be installed in a directory with customized name
2013-02-20 08:44:16 -08:00
Roland Kaufmann
bf92600595 Enable customization of class doc. dir. name
Distributions have various conventions for this, so the package must
be able to tell where it wants the class doc. to be put for the
`install` target.
2013-02-20 14:36:27 +01:00
Bård Skaflestad
42e1fc6d10 Merge pull request #155 from rolk/153_datafiles
Make `make test` work on release builds
2013-02-20 05:20:57 -08:00
Roland Kaufmann
e1488bbca7 Fix dependencies between test programs and datafiles
Apparently, DEPENDS can only be used between file-level dependencies
and not target-level dependencies. add_dependencies must be used for
that.
2013-02-20 14:07:29 +01:00
Roland Kaufmann
fa01a6fed1 Change directory with test driver for older CMakes
The WORKING_DIRECTORY property wasn't added until 2.8.4; for versions
earlier than that we provide a work-around. On newer versions we set the
property since some other components may use it.
2013-02-20 10:33:29 +01:00
Roland Kaufmann
ebc0be26aa Make sure that datafiles are copied when tests are made
That way, if someone runs `make test`, the datafiles will be there if
the testing programs are there, and the tests won't fail (because of
that).
2013-02-19 23:28:44 +01:00
Roland Kaufmann
abf418f2bd Use provided filenames instead of hardcoded list 2013-02-19 23:04:37 +01:00
Roland Kaufmann
b53e39ada5 Remove copied data files on distclean 2013-02-19 23:00:01 +01:00
Roland Kaufmann
9328cb896e Protect against underlinking of UMFPACK library
If libumfpack.so does not declare an explicit dependency on libamd.so,
the linker option -Wl,--as-needed will cause an undefined reference
since we don't use libamd.so ourself. If the configuration determines
that this may be the case, a linker option that forces linking the the
AMD library is added for the SuiteSparse library, and the general
configuration then gets out of the way if this is set.
2013-02-19 13:15:00 +01:00
Roland Kaufmann
be7ad261d5 Probe various candidates for system release info
Not all Linux distributions is LSB-compliant, notably RHEL 6, so we
should make an effort to check various known other files in order to
identify the distribution.
2013-02-15 13:58:49 +01:00