[cmake-developers] Global flags for creating static libraries

Evan Pipho hiwrac at gmail.com
Fri Dec 7 00:04:34 EST 2012


Moving this to the developer list where I meant it to be, rather than on
the cmake users list.  Sorry for anyone who gets it twice.


I am looking for a way to set global flags for the librarian when creating
static libraries, similar to CMAKE_SHARED_LINKER_FLAGS
or CMAKE_EXE_LINKER_FLAGS.  This would facilitate things like using 3rd
party libraries that already use cmake without having to modify their
CMakeLists.txt to set these flags.


> I found http://public.kitware.com/Bug/view.php?id=10094 which mentions
> using CMAKE_STATIC_LINKER_FLAGS as well as this fairly old thread
> http://www.cmake.org/pipermail/cmake/2009-October/032563.html also
> mentioning this.
>
> Has there been any progress on this feature?
> If not, does a feature that exposes a CMAKE_STATIC_LINKER_FLAGS (and
> CMAKE_STATIC_LINKER_FLAGS_<TARGET>) which are then passed to the librarian
> (ar, lib.exe etx) make sense?  I think this would be quite useful,
> especially for those of us that use cmake with visual studio.
>
> I would like to get the lists input, and if it is positive I would be
> interested in creating a patch to add this functionality.
>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20121207/308573cf/attachment.html>


More information about the cmake-developers mailing list