summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-02-01 19:26:25 (GMT)
committerBrad King <brad.king@kitware.com>2018-02-01 19:36:09 (GMT)
commit20676cbaca92d1b3ad486518e34e99aef75ebe11 (patch)
tree12e3227fbb49d94d734795e097fbd04a8619ed3f
parent5a16e762e21e22e7a212acc7e2bc7bd027d66166 (diff)
downloadCMake-20676cbaca92d1b3ad486518e34e99aef75ebe11.zip
CMake-20676cbaca92d1b3ad486518e34e99aef75ebe11.tar.gz
CMake-20676cbaca92d1b3ad486518e34e99aef75ebe11.tar.bz2
Ninja: Remove unused device link line code
Remove the `PRE_LINK` and `POST_BUILD` variables. They are not referenced by `WriteDeviceLinkRule`. Remove the `byproducts` local variable from `WriteDeviceLinkStatement` and all the code populating it. We never used the result.
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx28
1 files changed, 0 insertions, 28 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index eb595ba..ddbc772 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -685,16 +685,11 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
}
}
- cmNinjaDeps byproducts;
-
if (!this->TargetNameImport.empty()) {
const std::string impLibPath = localGen.ConvertToOutputFormat(
targetOutputImplib, cmOutputConverter::SHELL);
vars["TARGET_IMPLIB"] = impLibPath;
EnsureParentDirectoryExists(impLibPath);
- if (genTarget.HasImportLibrary()) {
- byproducts.push_back(targetOutputImplib);
- }
}
const std::string objPath = GetGeneratorTarget()->GetSupportDirectory();
@@ -712,29 +707,6 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement()
std::replace(link_path.begin(), link_path.end(), '\\', '/');
}
- const std::vector<cmCustomCommand>* cmdLists[3] = {
- &genTarget.GetPreBuildCommands(), &genTarget.GetPreLinkCommands(),
- &genTarget.GetPostBuildCommands()
- };
-
- std::vector<std::string> preLinkCmdLines, postBuildCmdLines;
- vars["PRE_LINK"] = localGen.BuildCommandLine(preLinkCmdLines);
- vars["POST_BUILD"] = localGen.BuildCommandLine(postBuildCmdLines);
-
- std::vector<std::string>* cmdLineLists[3] = { &preLinkCmdLines,
- &preLinkCmdLines,
- &postBuildCmdLines };
-
- for (unsigned i = 0; i != 3; ++i) {
- for (cmCustomCommand const& cc : *cmdLists[i]) {
- cmCustomCommandGenerator ccg(cc, cfgName, this->GetLocalGenerator());
- localGen.AppendCustomCommandLines(ccg, *cmdLineLists[i]);
- std::vector<std::string> const& ccByproducts = ccg.GetByproducts();
- std::transform(ccByproducts.begin(), ccByproducts.end(),
- std::back_inserter(byproducts), MapToNinjaPath());
- }
- }
-
cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator();
// Device linking currently doesn't support response files so