diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-10-22 16:05:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-10-23 12:18:02 (GMT) |
commit | 0b3b3368fb8ee712aa06fcb2b9c6e288905ca6ae (patch) | |
tree | a99ce240c933fdf71853eb53e76e445571dbf625 /Source | |
parent | c515dc574879448d66e2c5a27b9807d95a27fefd (diff) | |
download | CMake-0b3b3368fb8ee712aa06fcb2b9c6e288905ca6ae.zip CMake-0b3b3368fb8ee712aa06fcb2b9c6e288905ca6ae.tar.gz CMake-0b3b3368fb8ee712aa06fcb2b9c6e288905ca6ae.tar.bz2 |
CMP0022: Output link interface mismatch for static library warning
Other warnings for the same policy already have similar output since
commit 81d2793e (Add differing target property content to policy CMP0022
warning, 2013-09-11).
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ac655da..9e2234e 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -6488,6 +6488,25 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, { case cmPolicies::WARN: { + std::string oldLibraries; + std::string newLibraries; + const char *sep = ""; + for(std::vector<std::string>::const_iterator it + = impl->Libraries.begin(); it != impl->Libraries.end(); ++it) + { + oldLibraries += sep; + oldLibraries += *it; + sep = ";"; + } + sep = ""; + for(std::vector<std::string>::const_iterator it + = ifaceLibs.begin(); it != ifaceLibs.end(); ++it) + { + newLibraries += sep; + newLibraries += *it; + sep = ";"; + } + cmOStringStream w; w << (this->Makefile->GetPolicies() ->GetPolicyWarning(cmPolicies::CMP0022)) << "\n" @@ -6495,7 +6514,13 @@ bool cmTarget::ComputeLinkInterface(const char* config, LinkInterface& iface, "INTERFACE_LINK_LIBRARIES property. This should be preferred " "as the source of the link interface for this library. " "Ignoring the property and using the link implementation " - "as the link interface instead."; + "as the link interface instead." + "\n" + "INTERFACE_LINK_LIBRARIES:\n " + << newLibraries + << "\n" + << "Link implementation:\n " + << oldLibraries << "\n"; this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str()); } // Fall through |