[CMake] Adding object files to library

Troels Frimor troels at in.tum.de
Thu Dec 2 10:19:18 EST 2004


Just to make sure that this is not a simple type error.

The printed variable and the one added to the library is not the same!

With regards,
Troels

Karl Merkley wrote:
> 
> 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
> 
> 
> _______________________________________________
> CMake mailing list
> CMake at www.cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
> 
> 



More information about the CMake mailing list