[CMake] Produce only an object file (*.o) from a CMake build target

David Cole david.cole at kitware.com
Mon Jan 24 14:37:54 EST 2011


On Mon, Jan 24, 2011 at 2:33 PM, Andreas Pakulat <apaku at gmx.de> wrote:

> On 24.01.11 09:37:01, Helseth, Nicholas H wrote:
> > I'm trying to build an object file using CMake, but I can't seem to
> > get CMake to build something other than a complete executable. I'm
> > basically looking for the result of the following compilation (the
> > result will be loaded on a VxWorks target and linked then-it needs to
> > be a *.o because of the way our build system works):
>
> You can't do this with cmake.
>
>
But you can do anything you want with custom commands in CMake. It just
might not be very easy or very cross-platform.

Why do you need the *.o files individually?

Could you instead build a static library with CMake, and then use a custom
command to glob for the *.o files produced?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110124/94a1708e/attachment.htm>


More information about the CMake mailing list