summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGeneratorTarget.cxx4
-rw-r--r--Tests/RunCMake/target_link_options/CMP0099.cmake9
2 files changed, 8 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index a4a074f..94ce2e1 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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);
diff --git a/Tests/RunCMake/target_link_options/CMP0099.cmake b/Tests/RunCMake/target_link_options/CMP0099.cmake
index 9dee964..edb457e 100644
--- a/Tests/RunCMake/target_link_options/CMP0099.cmake
+++ b/Tests/RunCMake/target_link_options/CMP0099.cmake
@@ -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)