Commit f6e29e04 authored by Brad King's avatar Brad King Committed by Kitware Robot

Merge topic 'link-options-propagation'

af9d4f24 Link properties: must be transitive over private dependency on static library
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !4130
parents 4fb9c880 af9d4f24
......@@ -1215,8 +1215,8 @@ std::string cmGeneratorTarget::EvaluateInterfaceProperty(
context->EvaluateForBuildsystem, context->Backtrace,
context->Language);
std::string libResult = cmGeneratorExpression::StripEmptyListElements(
lib.Target->EvaluateInterfaceProperty(prop, &libContext,
&dagChecker));
lib.Target->EvaluateInterfaceProperty(prop, &libContext, &dagChecker,
usage_requirements_only));
if (!libResult.empty()) {
if (result.empty()) {
result = std::move(libResult);
......
......@@ -9,8 +9,11 @@ endif()
add_library(LinkOptions_interface INTERFACE)
target_link_options (LinkOptions_interface INTERFACE ${pre}BADFLAG_INTERFACE${obj})
add_library(LinkOptions_static STATIC LinkOptionsLib.c)
target_link_libraries (LinkOptions_static PRIVATE LinkOptions_interface)
add_library(LinkOptions_static1 STATIC LinkOptionsLib.c)
target_link_libraries (LinkOptions_static1 PRIVATE LinkOptions_interface)
add_library(LinkOptions_static2 STATIC LinkOptionsLib.c)
target_link_libraries (LinkOptions_static2 PRIVATE LinkOptions_static1)
add_executable(LinkOptions_exe LinkOptionsExe.c)
target_link_libraries (LinkOptions_exe PRIVATE LinkOptions_static)
target_link_libraries (LinkOptions_exe PRIVATE LinkOptions_static2)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment