diff options
author | Brad King <brad.king@kitware.com> | 2013-02-15 18:11:04 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-02-15 18:11:04 (GMT) |
commit | 0e2ed9b097275ce45f61def179b0d3c7d71b83fa (patch) | |
tree | 4d257f74d29e8f9b93273a47511729a004aecafc /Source/cmTargetLinkLibrariesCommand.cxx | |
parent | 57833095ff1e3d07634472a79348f9dc428c7df2 (diff) | |
parent | fde949d1434c450914a8eab874940b3de074783c (diff) | |
download | CMake-0e2ed9b097275ce45f61def179b0d3c7d71b83fa.zip CMake-0e2ed9b097275ce45f61def179b0d3c7d71b83fa.tar.gz CMake-0e2ed9b097275ce45f61def179b0d3c7d71b83fa.tar.bz2 |
Merge topic 'linked-usage-cleanup'
fde949d Don't add target-specific interface includes and defines to Qt 4 targets.
79ae968 Revert "Add a way to exclude INTERFACE properties from exported targets."
71bf96e Revert "find_package: Reword <package>_NO_INTERFACES documentation"
3df36b5 Revert "Add the $<LINKED:...> generator expression."
e1f9080 Don't populate INTERFACE includes and defines properties in tll.
567c8d1 Revert "Don't allow utility or global targets in the LINKED expression."
a1c4905 Use the link information as a source of compile definitions and includes.
5c9f5e3 Don't use LINKED where not needed.
5b88504 Rename the IncludeDirectoriesEntry to be more generic.
b030323 Fix determination of when we're evaluating compile definitions.
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r-- | Source/cmTargetLinkLibrariesCommand.cxx | 52 |
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(); |