[CMake] Link flags in CMAKE_CXX_CREATE_STATIC_LIBRARY

Daniel Eiband daniel.eiband at brainlab.com
Thu Aug 9 09:30:00 EDT 2018


Hi Brad,

Thanks a lot, works like a charm!

Daniel

-----Original Message-----
From: Brad King [mailto:brad.king at kitware.com] 
Sent: Donnerstag, 9. August 2018 15:21
To: Daniel Eiband <daniel.eiband at brainlab.com>; cmake at cmake.org
Subject: Re: [CMake] Link flags in CMAKE_CXX_CREATE_STATIC_LIBRARY

On 08/07/2018 06:54 AM, Daniel Eiband wrote:
> set_property(TARGET MyTarget APPEND PROPERTY LINK_FLAGS "/ignore:4221")
> 
> This however doesn't affect the creation of static libraries.

Static libraries are created by the librarian tool, not the linker.
There is a separate STATIC_LIBRARY_FLAGS property for this:

  https://cmake.org/cmake/help/v3.12/prop_tgt/STATIC_LIBRARY_FLAGS.html

-Brad


More information about the CMake mailing list