On 2013-03-19 15:11, Markus Blatt wrote:
It seems like the include path is setup such that the compiler always
uses the installed version of the header when building out-of-source.
Let us review the include paths that are put on the command line:
-I/home/mblatt/dune-test/opm-porsol/auto-tools
(1) This is the build directory. It have to be included **first**
because it contains the (most) correct `config.h'.
-I/home/mblatt/dune_install_2.2/include
(2) This is the "installation" directory, but it is **not** the prefix
directory of opm-porsol, because that is never added to the command
line. More likely is it the header path to the DUNE packages.
-I/home/mblatt/dune-test/opm-core
-I/home/mblatt/dune-test/dune-cornerpoint
(3) These are the path to the header files of the dependencies within
the OPM suite.
-I/home/mblatt/dune-test/opm-porsol
(4) This is the source directory of the project itself. I agree that it
is unfortunate that this is last; it could be second, so that it can
override headers in the dependencies, although it is very, very
dangerous to depend on this because that may not be honored in other
projects. E.g. dune-cornerpoint will now be pulled from the
dune_install_2.2 directory if it (incidently) is there. Hopefully then,
will dune-cornerpoint be `install`ed before the next project pulls in
any old headers.
So (1)+(2)+(3)+(4) should be (1)+(4)+(2)+(3). The pull-request
OPM/opm-core#213 fixes this.
--
Roland.
_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm