`add_custom_command` with target properties at build time

I am trying to design an interface for fypp that mimics add_library, target_sources and add_executable. The issue I am currently stuck on is how can I get the target properties, e.g. COMPILE_DEFINITIONS that would be run at build time. I have considered using cmake_language(deffer), but I don’t think that will help with genex or add_custom_command(APPEND).

The only reliably way to get the full flags is by something like CMAKE_<LANG>_COMPILER_LAUNCHER, compile_commands.json, or the cmake-file-api. I think getting fypp support as an alternative Fortran preprocessor may be easier.

Indeed and maybe you’ve read in the other post, the issue is that the suffix needs to chnage from .fypp to .f90, which is not supported by <PREPROCESSED_SOURCES>

Yeah, that’s hard-coded logic too (the .F90 extension change at least).