summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx52
1 files changed, 8 insertions, 44 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index 9dd0e5b..3f652c9 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -252,45 +252,21 @@ cmTargetLinkLibrariesCommand
}
//----------------------------------------------------------------------------
-static std::string compileProperty(cmTarget *tgt, const std::string &lib,
- bool isGenex,
- const std::string &property,
- cmTarget::LinkLibraryType llt)
-{
- std::string value = !isGenex ? "$<LINKED:" + lib + ">"
- : "$<$<TARGET_DEFINED:" + lib + ">:" +
- "$<TARGET_PROPERTY:" + lib +
- ",INTERFACE_" + property + ">"
- ">";
-
- return tgt->GetDebugGeneratorExpressions(value, llt);
-}
-
-//----------------------------------------------------------------------------
void
cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
cmTarget::LinkLibraryType llt)
{
- const bool isGenex = cmGeneratorExpression::Find(lib) != std::string::npos;
-
- const bool potentialTargetName
- = cmGeneratorExpression::IsValidTargetName(lib);
-
- if (potentialTargetName || isGenex)
- {
- this->Target->AppendProperty("INCLUDE_DIRECTORIES",
- compileProperty(this->Target, lib,
- isGenex,
- "INCLUDE_DIRECTORIES", llt).c_str());
- this->Target->AppendProperty("COMPILE_DEFINITIONS",
- compileProperty(this->Target, lib,
- isGenex,
- "COMPILE_DEFINITIONS", llt).c_str());
- }
-
// Handle normal case first.
if(this->CurrentProcessingState != ProcessingLinkInterface)
{
+ {
+ cmListFileBacktrace lfbt;
+ this->Makefile->GetBacktrace(lfbt);
+ cmValueWithOrigin entry(this->Target->GetDebugGeneratorExpressions(lib,
+ llt),
+ lfbt);
+ this->Target->AppendTllInclude(entry);
+ }
this->Makefile
->AddLinkLibraryForTarget(this->Target->GetName(), lib, llt);
if (this->CurrentProcessingState != ProcessingPublicInterface)
@@ -300,18 +276,6 @@ cmTargetLinkLibrariesCommand::HandleLibrary(const char* lib,
}
}
- if (potentialTargetName || isGenex)
- {
- this->Target->AppendProperty("INTERFACE_COMPILE_DEFINITIONS",
- compileProperty(this->Target, lib,
- isGenex,
- "COMPILE_DEFINITIONS", llt).c_str());
- this->Target->AppendProperty("INTERFACE_INCLUDE_DIRECTORIES",
- compileProperty(this->Target, lib,
- isGenex,
- "INCLUDE_DIRECTORIES", llt).c_str());
- }
-
// Get the list of configurations considered to be DEBUG.
std::vector<std::string> const& debugConfigs =
this->Makefile->GetCMakeInstance()->GetDebugConfigs();