On 01/14/2011 12:17 PM, Andrea Galeazzi wrote:
> Given a source file (path/foo.c),  does CMake provide a way to retrieve 
> the obj file path/filename generate by the compiler?

With the Makefile generators, you might use the RULE_LAUNCH properties
to intercept the compiling/linking phase, including to influence where
the object files are written to and read from, but this is of limited
portability, error-prone and should be considered only in very special
cases, see [1]. Alternatively, you could try to rewrite variables like
CMAKE_<LANG>_COMPILE_OBJECT and friends to achieve your goal, but the
same objections apply here, too, cf. [2].

Regards,

Michael

[1] http://www.mail-archive.com/cmake@cmake.org/msg29622.html
[2] http://www.mail-archive.com/cmake@cmake.org/msg31533.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to