[CMake] Adding object files to library
Karl Merkley
karl at elemtech.com
Thu Dec 2 10:10:51 EST 2004
I have a problem with the current CVS version. I am trying to do the
following
ADD_LIBRARY(cml ${CML_SRCS} ${CML_HDRS} ${INR_C_SRCS} ${INR_OBJS})
where INR_OBJS is a list of object files generated from Fortran source.
I can use MESSAGE(STATUS "${IN_OBJS}") and print out the list of
object files from cmake but they never show up in Makefile.
This process works with the 2.0.3 version of CMake but not with the
latest version out of CVS. (I moved to the CVS version to fix some
problems with Mac OSX).
I traced this through the source code and find that I do not get past
the following statement
if(outExt.size() &&
!(*i)->GetPropertyAsBool("EXTERNAL_OBJECT") ) //
cmLocalUnixMakefileGenerator.cxx" line 487
I tried adding
SET_SOURCE_FILES_PROPERTIES(${var} PROPERTIES EXTERNAL_OBJECT OFF) to
my CMakeLists.txt but it doesn't help.
Is this a bug or is there another way to work around this and set the
correct property on an object file?
Thanks,
Karl
karl at elemtech dot com
More information about the CMake
mailing list