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

Helseth, Nicholas H Nicholas.H.Helseth at boeing.com
Mon Jan 24 12:37:01 EST 2011


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):
$(CC) $(CFLAGS) $(INC_DIRS) -c src/object.c
I've tried changing the OUTPUT_NAME property of the target, but that doesn't seem to help, either.
I think I could work around this by using a custom command, but that seems like I'm also working around the nice things that CMake provides.
Thanks for your help!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110124/e7c62498/attachment.htm>


More information about the CMake mailing list