geodynamics / aspect

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

Separate additional CXX arguments #6111

Closed gassmoeller closed 4 weeks ago

gassmoeller commented 4 weeks ago

As part of the testing in #8366 I noticed that I cannot set more than one flag in ASPECT_ADDITIONAL_CXX_FLAGS, because of how we incorporate them into the compile flags for world builder. The call to target_compile_options expects a cmake list (a semicolon separated string), while the input string from cmake is a space separated string (as one would expect for command line arguments). It looks like the best way to convert this string into a list seems to be the separate_arguments command (https://stackoverflow.com/a/22148384).

This is only a problem for the world builder, because for ASPECT itself we append the the additional flags to the DEAL_II_CXX_FLAGS_DEBUG and _RELEASE strings which will be dealt with by deal.II macros.