[CMake] How can I get list of object files in a variable?

Phil Smith phil at voltage.com
Tue Sep 30 07:25:30 EDT 2008


1) GET_PROPERTY(sourcefiles TARGET <targetname> PROPERTY SOURCES)  seems to do what you want.

2) I don't understand the question.
-----Original Message-----
From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of zia at itsib.ru
Sent: Tuesday, September 30, 2008 1:31 AM
To: CMake
Subject: [CMake] How can I get list of object files in a variable?

Hello!

I have a little problems.

problem number one
How can I get list of object files in a variable?
that is I write in CMakeLists.txt SET(CMAKE_C_LINK_EXECUTABLE   "c:/linkit.bat <TARGET> <OBJECTS>")
when linkit.bat
echo "%1" > obj.txt
echo "%2" >> obj.txt
but I am not see list of object files.

if I write MESSAGE(STATUS <OBJECTS>), MESSAGE(STATUS "<OBJECTS>") or MESSAGE(STATUS ${OBJECTS})

ADD_CUSTOM_COMMAND(OUTPUT "o.txt"
                   COMMAND "c:/linkit.bat <TARGET> <OBJECTS>"
                   COMMENT "Create obj files")

I am not see list of object files too. How can I get list of object
files?

and problem number two
Does CMake support svn but it is not run ADD_CUSTOM_COMMAND?



_______________________________________________
CMake mailing list
CMake at cmake.org
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list