[CMake] faking convenience libraries

Brandon J. Van Every bvanevery at gmail.com
Mon Feb 12 11:50:39 EST 2007


Bill Hoffman wrote:
> Brandon J. Van Every wrote:
>>
>> Well I figured out the paths to the .OBJ files.  Note they're coming 
>> out as .OBJ files on Windows, both for MinGW and for MSVC.  When I 
>> dump my .OBJ file absolute pathnames into ADD_LIBRARY, CMakeSetup 
>> complains that "the source file doesn't exist," because of course 
>> they haven't been built yet.  I tried 
>> SET_SOURCE_FILES_PROPERTIES(${theobjs}PROPERTIES GENERATED true), but 
>> it doesn't suppress the error.  I don't think that function thinks 
>> they're source files.  Says it tried just about every extension, 
>> except the .obj and .o extensions I might actually be interested in.
> Not sure, must be something wrong in your script.  The following works 
> with nmake and gmake with cl, and works  on linux.

I was trying to propagate SET_SOURCE_FILES_PROPERTIES to a 
subdirectory.  For GENERATED this makes sense, as files typically have 1 
point of generation.  So, it would be reasonable to set GENERATED once 
at the place they're generated, rather than several times wherever they 
are consumed.  I am not sure if directory propagation would be 
reasonable for other properties though.  Is this worthy of a feature 
request, or is it not doable / adviseable?


Cheers,
Brandon Van Every


More information about the CMake mailing list