[CMake] Is there really no way in CMake to retrieve the objects file for a target?

Stephen Kelly steveire at gmail.com
Tue Oct 28 18:00:49 EDT 2014


Emmanuel Blot wrote:

> This seems so convoluted that I guess I'm missing the proper way to
> properly add an intermediate step between the compilation and link
> stages, but I keep failing to find any useful advice from Google and
> the mailing list.

It's probably not possible cleanly.

Generator expressions can give you the list of object files in the makefile 
generators, but limitations in how the IDE generators work make it hard to 
implement.

 http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5de63265
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/9705/focus=9722

I added a bug report to track this missing feature:

 http://public.kitware.com/Bug/view.php?id=15226

However, this is all just for information. I don't know that you'd be able 
to manipulate the files between compilation and linking without messing up 
the dependency logic.

Thanks,

Steve.




More information about the CMake mailing list