Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CMake] Wrong order of include directories #37

Closed
blattms opened this issue Mar 19, 2013 · 4 comments
Closed

[CMake] Wrong order of include directories #37

blattms opened this issue Mar 19, 2013 · 4 comments
Labels

Comments

@blattms
Copy link
Member

blattms commented Mar 19, 2013

Just noticed this for opm-porsol, but I would guess that it applies to all other modules, too:

When building an opm module with the same module and other modules installed using a common prefixe (in my case /home/mblatt/dune_install_2.2/include), the source path of the current modules has to have precedence before the include path of the installed modules. Currently, it is the last one:

auto-tools/CMakeFiles/aniso_simulator_test.dir/flags.make:CXX_FLAGS = -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

When working with installed modules (/home/mblatt/dune_install_2.2/include), this means that all headers included using

#include<path/to/header>

will result in the installed headers being included rather than the local ones.

@blattms
Copy link
Member Author

blattms commented Mar 19, 2013

Solution: Prepend the include path of the current module to then list instead of appending it.

@rolk
Copy link
Member

rolk commented Mar 20, 2013

Should be fixed in OPM/opm-core#213. Monkey-patch your installation from this if necessary until the change bubbles down to the other repos.

@atgeirr
Copy link
Member

atgeirr commented Mar 21, 2013

Was this fixed by #40? In which case it should be closed.

@rolk
Copy link
Member

rolk commented Mar 22, 2013

Was this fixed by #40? In which case it should be closed

Yes, the patch from OPM/opm-core#123 is included in #40.

@rolk rolk closed this as completed Mar 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants