diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2016-11-14 16:39:23 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2016-11-14 16:39:23 (GMT) |
commit | de7083f3c0bdc9c0af0d35c44afde86aab6d6622 (patch) | |
tree | 91ecae2be86860521d2a472c9767be0853b9a775 /Source | |
parent | 8b33507aba37f7aa8dc1c0d961ba49ef10679449 (diff) | |
download | CMake-de7083f3c0bdc9c0af0d35c44afde86aab6d6622.zip CMake-de7083f3c0bdc9c0af0d35c44afde86aab6d6622.tar.gz CMake-de7083f3c0bdc9c0af0d35c44afde86aab6d6622.tar.bz2 |
Ninja: Document why ComputeLinkCmd is structured the way it is.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 3 |
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); |