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

Always set up both DEBUG and RELEASE targets, utilize EXCLUDE_FROM_ALL. #5782

Closed bangerth closed 4 months ago

bangerth commented 4 months ago

Right now, there is quite a complicated scheme based on what CMAKE_BUILD_TYPE is -- Debug, Release, or DebugRelease. This leads to lengthy convolutions, but most of this can be avoided if we simply always set up debug and release targets, and in only one place actually consider CMAKE_BUILD_TYPE: There, we have to decide whether we want to set EXCLUDE_FROM_ALL for a specific target. That's because if you just call make, it builds the target ALL, which by default contains all other top-level targets. But we can set EXCLUDE_FROM_ALL on those targets we don't want to be dealt with by default. This creates 2x as many targets as perhaps necessary, but that shouldn't be too much of a problem since half of them will not actually be built.

bangerth commented 4 months ago

I think I have a better system in place after #5809 .