Enhancement: Need to access objects of a target from within PRE_LINK custom command
See a thread on the mailing list: https://cmake.org/pipermail/cmake/2019-February/069085.html
I need to operate on the object files that are going to be used to create a shared library or executable. In my case, I'm using a PRE_LINK custom command to massage a linker version script based on the contents of my object files.
Today, there's no portable way to find all the object files being added to the target, or even to locate the directory where all the object files are being written.
I'd really like either (a) a new target property holding the directory containing the target's object files, or else (b) extending the existing $<TARGET_OBJECTS>
generator expression so it could accept any target, not just OBJECT targets, and list the object files for that target (this latter idea suggested by @robertmaynard ).