[CMake] Link flags in CMAKE_CXX_CREATE_STATIC_LIBRARY

Brad King brad.king at kitware.com
Thu Aug 9 09:21:06 EDT 2018


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