[CMake] scope of set_source_files_properties?
Hendrik Sattler
post at hendrik-sattler.de
Tue Mar 23 12:36:48 EDT 2010
Am Dienstag 23 März 2010 16:42:42 schrieb Brad King:
> > All the sources are going into a single *library*. I could make a bunch
> > of static libraries corresponding to each folder, but I'm not sure how to
> > subsequently link all them into a single static library. (It's been
> > mentioned elsewhere on this list, but the answer was vague.)
>
> That's a "convenience" library approach, and it's not really supported
> (partly because there is no way to implement it on some toolchains such
> as MSVC).
The problem comes up once in a while. And the argument for why this doesn't
work is that you cannot link static libraries into another. Well, then don't,
I'd say. CMake knows the names of the object files to link into the final
library, it just needs a frame to let the CMake user work with it. One could
be a VIRTUAL key word for add_library that makes it just a place-holder for a
group of object files: no link stage. When such a "library" is linked to
another, well... obvious...
HS
More information about the CMake
mailing list