Commit Graph

169 Commits

Author SHA1 Message Date
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
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
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
7b046ce5a8 Quote output correctly 2013-02-19 22:58:35 +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
Atgeirr Flø Rasmussen
0af4c3bbca Merge pull request #146 from rolk/0146_testing_dep
Remove dependency on Boost.Test from main library
2013-02-15 01:31:15 -08:00
Roland Kaufmann
b2520ab9cb Print CMake and OS version info to configuration log
Instead of asking the user which distribution it is, this will now be
visible from the log (which is included when uploading CTest runs)
2013-02-15 10:13:14 +01:00
Roland Kaufmann
c423fc7a86 Move version information together with other headers 2013-02-15 09:57:45 +01:00
Roland Kaufmann
8948f02746 Remove dependency on Boost.Test from main library
The unit tests are not bundled with the runtime, so it is an unnecessary
dependency. (It is still of course a dependency for the development
package).
2013-02-15 09:39:53 +01:00
Roland Kaufmann
456bd8de0b Don't reset list of tutorial programs after filtering
The list of tutorial programs were filtered on whether UMFPACK was
located or not, but then the list was reset to the original again
just before compilation starts.

Also corrected a minor spelling error which caused a similar error.
2013-02-13 21:24:54 +01:00
Roland Kaufmann
6bbcbd97db Compile examples as well 2013-02-11 23:08:29 +01:00
Roland Kaufmann
dac2b6cf81 Disable tutorials dependent on Umfpack if this is not found 2013-02-11 23:08:29 +01:00
Roland Kaufmann
6d1514d7ca Enumerate all files before we start disabling components 2013-02-11 23:08:29 +01:00
Roland Kaufmann
32b7e527ee Modularize compilation of tests and tutorials 2013-02-11 23:08:29 +01:00
Roland Kaufmann
f67a066bdd Modularize copying of test input files 2013-02-11 23:08:28 +01:00
Roland Kaufmann
fc03931356 Rearrange header to get key info first 2013-02-11 23:08:28 +01:00
Roland Kaufmann
d9696c7ea4 Modularize default build settings 2013-02-11 23:08:28 +01:00
Roland Kaufmann
42cab79feb Modularize location of source files 2013-02-11 23:08:28 +01:00
Roland Kaufmann
7bfa115fb3 Modularize compilation of main library 2013-02-11 23:08:28 +01:00
Roland Kaufmann
293ea97fa9 Modularize installation target 2013-02-11 23:08:28 +01:00
Roland Kaufmann
e4e9c1cfaa Modularize documentation 2013-02-11 23:08:28 +01:00
Roland Kaufmann
d2e5361c35 Modularize dist-clean target 2013-02-11 23:08:28 +01:00
Roland Kaufmann
12dfe529ff Don't distinguish between target and project variables
Since the project is only building one main target, the library, and
the other targets are just auxiliaries, then the distinction becomes
confusing and unnecessary.
2013-02-11 23:08:28 +01:00
Roland Kaufmann
ae6e5314e3 Remove hardcoded project names and directories
Everything is now set through variables, which means that we can
change the name of the project by just altering the header.
2013-02-11 23:08:28 +01:00
Roland Kaufmann
39dd997dc1 Clean extra files that has been added to configure 2013-02-11 23:08:27 +01:00
Roland Kaufmann
99f2a6e55f Output the name of the libtool archive generated
Enables us to take of this file in a custom clean rule.
2013-02-11 23:08:27 +01:00
Roland Kaufmann
4d00754e01 Move stylesheets into Documentation/ folder
The Doxyfile is still in the root directory because this is more like
a configuration file, and also its presence will be a cue to some
users that Doxygen is possible to run on the project.
2013-02-11 23:08:27 +01:00
Roland Kaufmann
5c5a1e5c10 Don't hardcode the library name in templates 2013-02-11 23:06:39 +01:00
Roland Kaufmann
2f20314ffb Pick up description from one place 2013-02-11 23:06:39 +01:00
Roland Kaufmann
5af259f2e1 Report version hash when building
This will reduce the number of "which version are you using"-replies
because this can now be found in the log.
2013-02-11 23:06:38 +01:00
Tor Harald Sandve
8ea72fcec1 Use relative path to link style.css correctly from website
If an absolute path is specified, this will be embedded into the
generated files, which is of course not correct when put on another
host.
2013-02-11 23:06:38 +01:00
Roland Kaufmann
bacd1c317c Use same default as DUNE; build as a static library
Packages should build with -DBUILD_SHARED_LIBS=ON
2013-02-11 23:06:38 +01:00
Roland Kaufmann
bee65647ad Write information file for libtool 2013-02-11 23:06:38 +01:00
Roland Kaufmann
33115d6f41 Put static libraries in the same directory as shared 2013-02-11 23:06:38 +01:00
Roland Kaufmann
1533271e03 Only install .debug files when building shared object
Static libraries usually holds the debug information together with the
library because they are not loaded directly (but linked together to an
executable, which can be stripped)
2013-02-11 23:06:37 +01:00
Roland Kaufmann
46975fc130 Enable building as a link in dunecontrol chain
Dunecontrol scans the module directory for certain files and phrases
which must be present if the project can be used as a dependency for
other DUNE modules.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
39758ab13b Revert clever setting of version number in dune.module
dunecontrol will read the dune.module file first, before calling any
configuration files; thus it cannot be initialized from the script
but the version numbers must be hardcoded here and updated manually.
2013-02-11 23:06:37 +01:00
Roland Kaufmann
aedada918e Install .debug files in system location if writable
If the installation prefix is set to /usr, then it is assumed that the
user has write access to the entire of that subtree, and that it would
be advantageous to put the .debug files in the /usr/lib/debug directory.
This is the usual case for package installations.

On the other hand, if the prefix is NOT /usr, then it is probably a
local installation; someone trying to install it to a more restricted
area. In that case, the default is to follow the binary, so that GDB
will still pick up the .debug file when loading the shared object.

In any case can this default be overridden, should it turn out that the
configuration script has guessed wrongly for your needs.
2013-02-11 23:06:36 +01:00
Roland Kaufmann
80f4c93973 Make datafiles from source tree available for tests
The datafiles that are in the tests/ directory are copied to a
corresponding location in the output tree, and the tests are then
executed from this directory (i.e. their current directory is set
to tests/.

If a test overwrites an input file, this will not be noticed in the
source tree -- but don't do that! The tests have write access to
their current directory, so they can generate new files and compare
them to a stored master file.
2013-02-11 23:06:36 +01:00
Roland Kaufmann
5ed1aa37f0 Move writing of config module to library routine 2013-02-11 22:38:02 +01:00
Roland Kaufmann
529b2bc88b Build tutorials through Makefile
Newcomers may want to step through the tutorials in the debugger without
creating a new project specifically for them; this enables them to do so
through the regular build system.

To see how a program is linked with the library, just execute

    make tutorials VERBOSE=1
2013-02-11 22:38:02 +01:00
Roland Kaufmann
22f5ccf970 Use only necessary libraries 2013-02-11 22:38:01 +01:00
Roland Kaufmann
05a4ff30bf Enable opt-out of precompiled headers
Some versions of the compiler are buggy, and will actually crash if
precompiled headers are used. This option enable disabling the feature
and building without by simply setting a command-line option.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
c1023c0824 Run unit tests when doing `make check' 2013-02-11 22:38:01 +01:00
Roland Kaufmann
407faacdfc Use each unit test program as a CTest test
The name of the test is taken from the stem of the file; if two tests
have the same name in different directories, the makefiles will get
confused, so don't do that.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
c051337c29 Only build proper unit tests
People are encouraged to convert the tests in not-unit/ to proper unit
tests and move them back into the parent tests/ directory; they will
then be picked up by the testing framework automatically.
2013-02-11 22:38:01 +01:00
Roland Kaufmann
73c604f541 Put debug files in GDB's debug-file-directory
This puts the .debug file in the separate root reserved for such, as
pointed to by GDB's debug-file-directory setting, see
<http://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html>

Notice that this is *outside* of the prefix tree!
2013-02-11 22:38:01 +01:00
Roland Kaufmann
af014936cc Create DUNE module file from CMake properties
That will save us from keeping the files in sync manually.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
f4350098ed Use precompiled headers to compile C++ modules
On an average system this will cut around 15% of the total build time.
Unfortunately, including Boost headers in the precompiled header takes
longer time to generate and then read in each module, than just
including the necessary headers in each module.

Use Noel Llopis' list_precomp.py at
http://www.gamesfromwithin.com/wp-content/uploads/bin/list_precomp_py.txt
to analyse which headers are included the most and are candidates for
inclusion.
2013-02-11 22:38:00 +01:00
Roland Kaufmann
52304ef5e3 Remove TinyXML from list of headers to be installed 2013-02-11 22:38:00 +01:00