[CMake] Add a program object file to link

David cmoidavid at gmail.com
Tue Sep 29 03:16:31 EDT 2009


Hello,
I have a library which provides some static library (.a) and a program
object file (.o).
The .o is needed to compile the project which migrates from autotools to
cmake but I don't know
how adding properly this file into my CMakelist.
My current solution is to add the file.o to CMAKE_C_FLAGS.
For example :
set(CMAKE_C_FLAGS "-g -Wall file.o")

But I hope there is a better solution.
Of course, I have'nt the file needed to generate this file.o.

Any advices?

Thank you

David

---------
cmake 2.6.4
gcc 4
---------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090929/68237cb0/attachment-0001.htm>


More information about the CMake mailing list