[CMake] How compile to object file?

Alex J. Ivasyuv industral at gmail.com
Sun May 4 19:29:19 EDT 2008


Hi all!

how to compile file to object?
For example in Makefile was:

someObj.o: someFile.cpp someFile.hpp
    $(CXX) -fPIC -c someFile.cpp -o someObj.o $(FLAGS) $(IDIR)

I found add_library(someObj SHARED someFile.cpp)
but it compile to ".so" file not to object.
Setting variable SET (CMAKE_CXX_COMPILE_OBJECT true)
also have no effect.

Any ideas?



More information about the CMake mailing list