Feature Request: Implement genex that gives access to the target directory and filename
In working with embedded projects, being able to see the generated list file and map file is very valuable.
One of my tools (IAR) requires you to specify the filename of the list/map file and it will use that filename specified as the argument to open the output file.
So if I put "-map=output.map", each target executable will generate an "output.map" in the root of the build directory (since that's apparently where the tool is being invoked from ninja).
I can work around this with map files, since there's only 1 map file per target, and I can wrap "add_executable()" with my own "add_exectuable_ex()" and set the output file based on the current bin dir, etc. etc.
I can't, however, work around list files (i.e. source + assembly + directives, etc) that are generated for each compiled file. I end up with a bunch of files being created in the root of the build, complete with collisions and subsequent failures to build. I could try to wrap this for each target, but it starts getting messier and messier.
So, I'd like to request a genex like $<TARGET_OBJECT_DIR:tgt> or $<TARGET_OBJECT_FILENAME:tgt> or whatever that I can put into target_compile_options() or the toolchain file for CMAKE_CXX_FLAGS, etc. that expands to the current target output name