c++ - CMake link order and LINK_INTERFACE_MULTIPLICITY -
i'm attempting link static libraries against test cases in collaborative cmake project. understanding can use link_interface_multiplicity option around libraries being listed in wrong order. what's proper way this? i'm new cmake , docs bit daunting...
you can use set_target_properties
command this. example, if have 2 cmake targets, myliba
, mylibb
(added via add_library
calls), can set link_interface_multiplicity
value 3 both of these doing:
set_target_properties(myliba mylibb properties link_interface_multiplicity 3)
note that, while cmake commands, functions , macros case-insensitive, variables are case-sensitive. should use link_interface_multiplicity
, link_interface_multiplicity_debug
, link_interface_multiplicity_release
, etc., not link_interface_multiplicity
.
Comments
Post a Comment