[CMake] How could I control generated object files name?
huaiguang ye
green_nar at yahoo.com.cn
Fri Aug 7 05:02:46 EDT 2009
hi,
How could I control my generated object files name? Because I found in my cmake project, *.c/*.cc/*.cpp will generated to object *.c.o/*.cc.o/*.cpp.o, but I really want to get *.o. Such as:
$ find . -name "*.o"
./src/CMakeFiles/RSLcommon.dir/BasicDdm.cc.o
./src/CMakeFiles/RSLcommon.dir/DoubleArray.cc.o
./src/CMakeFiles/RSLcommon.dir/RslBoardInfo.cc.o
./src/CMakeFiles/RSLcommon.dir/RslMath.cc.o
./src/CMakeFiles/RSLcommon.dir/RslRebootReasons.cc.o
./src/CMakeFiles/RSLcommon.dir/RslStatusCode.cc.o
./src/CMakeFiles/RSLcommon.dir/RslSubsystemState.cc.o
./src/CMakeFiles/RSLcommon.dir/defstr.cc.o
./src/CMakeFiles/RSLcommon.dir/test1.c.o
./src/CMakeFiles/RSLcommon.dir/test2.cpp.o
And my CMakeLists.txt in src is below:
add_library(RSLcommon STATIC
BasicDdm.cc
DoubleArray.cc
RslBoardInfo.cc
RslMath.cc
RslRebootReasons.cc
RslStatusCode.cc
RslSubsystemState.cc
defstr.cc
test1.c
test2.cpp)
I don't know where is the wrong. And my cmake version is 2.6.4.
Another question is if I don't want to generated static or shared library neither, I only want to compiling source code(*.cc) to object files(*.o), what should I do?
Thanks in advance.
If you know the means of @, then you know the means of Internet.http://hgye.blogspot.com
___________________________________________________________
好玩贺卡等你发,邮箱贺卡全新上线!
http://card.mail.cn.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090807/23ea5084/attachment.htm>
More information about the CMake
mailing list