summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-11-14 16:49:05 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-11-14 16:49:05 (GMT)
commitd608cfb6bf6b93add793c64b40787307be10059a (patch)
treece9cc2f09459886550b684881e852084e3a01f38
parent4a4be0301bd9c6062738e87892cbe5bd8d900a49 (diff)
parentde7083f3c0bdc9c0af0d35c44afde86aab6d6622 (diff)
downloadCMake-d608cfb6bf6b93add793c64b40787307be10059a.zip
CMake-d608cfb6bf6b93add793c64b40787307be10059a.tar.gz
CMake-d608cfb6bf6b93add793c64b40787307be10059a.tar.bz2
Merge topic 'ninja-comment-ComputeLinkCmd'
de7083f3 Ninja: Document why ComputeLinkCmd is structured the way it is.
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index a23e0ad..3598914 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -332,6 +332,9 @@ std::vector<std::string> cmNinjaNormalTargetGenerator::ComputeLinkCmd()
std::vector<std::string> linkCmds;
cmMakefile* mf = this->GetMakefile();
{
+ // If we have a rule variable prefer it. In the case of static libraries
+ // this occurs when things like IPO is enabled, and we need to use the
+ // CMAKE_<lang>_CREATE_STATIC_LIBRARY_IPO define instead.
std::string linkCmdVar = this->GetGeneratorTarget()->GetCreateRuleVariable(
this->TargetLinkLanguage, this->GetConfigName());
const char* linkCmd = mf->GetDefinition(linkCmdVar);