geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
223 stars 235 forks source link

Make sure the compiler finds worldbuilder/config.h. #5777

Closed bangerth closed 4 months ago

bangerth commented 4 months ago

It isn't quite clear what is different on my system, or why not everyone has this problem.

When you use the copy of WorldBuilder in contrib/, we run WorldBuilder's cmake script that creates a config.h in the build directory. For some reason, the path to this file is not in the include path passed to my compiler, and I think that's because we never seem to describe that path to cmake. (That's definitely true in the ASPECT CMakeLists.txt file. Perhaps we do that in contrib/world_builder/CMakeLists.txt but it's unclear to me whether that only applies to the files compiled for the WorldBuilder itself, or also for the ASPECT files. The question is whether include_directories(...) called in a subdirectory also affects the include path in directories higher up -- that may even depend on the cmake version.) Either way, it does not hurt to be explicit.

tjhei commented 4 months ago

Okay, merging for now.