Make CMake and CodeGen simpler
At the moment all generated files, that come out of the CodeGen script need to be manually stated under OUT_FILES
in the waLBerla_generate_target_from_python
. Example:
https://i10git.cs.fau.de/walberla/walberla/-/blob/master/apps/benchmarks/FlowAroundSphereCodeGen/CMakeLists.txt
This has some disadvantages:
- It is always a bit clunky because as a user you first provide the names of the
OUT_FILES
as strings to the generation function and then one needs to copy all these names in the CMake file again. - It is error-prone in a few fashions. The biggest issue is the correct file ending for GPU support. This was partially solved in !518 (merged), however still one needs to think about whether a file is only generated for CPU or can vary depending on the CMake configuration. Second, some generation functions like
generate_info_header
only produce a header file. This user must know this to write a correct CMake file first try ... - A third big problem is, that every generation function can only produce a single file. Otherwise, it would be impossible for a user to know which files will come out in the back. Thus this system lacks flexibility as well