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

test cmake: check correct deal.II version #4866

Open tjhei opened 2 years ago

tjhei commented 2 years ago

We should verify that the test project found the same deal.II installation by comparing directories (or DEAL_II_PATH).

I also had a change in here which made sure it is search for the version I you are actually using for your aspect,

You might need "9.4.0-pre" EXACT to get this to work. A better option might be to compare DEAL_II_PATH with @DEAL_II_PATH@, though.

Originally posted by @tjhei in https://github.com/geodynamics/aspect/issues/4855#issuecomment-1167773864

bangerth commented 1 year ago

@tjhei What's the "test project"? Are you talking about the CMakeLists.txt in tests/?

tjhei commented 1 year ago

Correct. Here we search for deal.II in the test project: https://github.com/geodynamics/aspect/blob/38ef6dccae63a8e80ba133b55d6c64d218deb84f/CMakeLists.txt#L104

There is no guarantee that they point to the same version. This is likely correct when we configure with an empty directory because we provide directory hints, but it could break if you change the deal.II intallation for the main project when the test project still exists.