Hi,
I just tried to apply the changes Atgeirr proposed (removing a
warning) to my local versions and noticed the warning is still issued.
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.
The reason is that in this case only the build directory is in the
include path. Is that intentional?
E.g., when I build opm-porsol in opm-porsol/auto-tools :
make[2]: Entering directory
`/home/mblatt/dune-test/opm-porsol/auto-tools'
/usr/bin/cmake -E cmake_progress_report
/home/mblatt/dune-test/opm-porsol/auto-tools/CMakeFiles 1
[ 29%] Building CXX object
CMakeFiles/aniso_implicitcap_test.dir/examples/aniso_implicitcap_test.cpp.o
/usr/bin/c++ -DHAVE_CONFIG_H=1
-DDUNE_COMMON_FIELDVECTOR_SIZE_IS_METHOD=1 -DENABLE_SUPERLU=1
-std=c++11 -g -O0 -pipe -Wall -Wno-unknown-pragmas -ggdb3 -g -O0
-DDEBUG -I/home/mblatt/dune-test/opm-porsol/auto-tools
-I/home/mblatt/dune_install_2.2/include -I/usr/lib/openmpi/include
-I/usr/lib/openmpi/include/openmpi -I/usr/include/superlu
-I/usr/include
/suitesparse -I/home/mblatt/dune-test/opm-core
-I/home/mblatt/dune-test/dune-cornerpoint
-I/home/mblatt/dune-test/opm-porsol -o
CMakeFiles/aniso_implicitcap_test.dir/examples
/aniso_implicitcap_test.cpp.o -c
/home/mblatt/dune-test/opm-porsol/examples/aniso_implicitcap_test.cpp
The first include path should actually read
-I/home/mblatt/dune-test/opm-porsol/ instead of
-I/home/mblatt/dune-test/opm-porsol/auto-tools. Seems like the
{CMAKE,PROJECT}_BINARY_DIR is used instead of {CMAKE,PROJECT}_SOURCE_DIR
If we want to support out-of-source builds, this has to be fixed.
Cheers,
Markus
_______________________________________________
Opm mailing list
[email protected]
http://www.opm-project.org/mailman/listinfo/opm