summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-03-09 13:45:51 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-03-09 13:45:51 (GMT)
commit387466dd9508ae57a864cdd8f2c8d8d28140b74c (patch)
tree31b689ec4ecfa9a1a6d348da62d3b31f151a8d35 /Source/cmLocalUnixMakefileGenerator3.cxx
parentbdb00b36133c64a36fbba7fd6c648725062b6732 (diff)
parent66a9c90c4bb5bf93bd570a423f99486b24b9337d (diff)
downloadCMake-387466dd9508ae57a864cdd8f2c8d8d28140b74c.zip
CMake-387466dd9508ae57a864cdd8f2c8d8d28140b74c.tar.gz
CMake-387466dd9508ae57a864cdd8f2c8d8d28140b74c.tar.bz2
Merge topic 'custom-command-multiple-outputs'
66a9c90c Makefile: Fix multiple custom command outputs regression (#15116)
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx56
1 files changed, 2 insertions, 54 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 432cb3a..723e39b 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -92,7 +92,6 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
this->SkipAssemblySourceRules = false;
this->MakeCommandEscapeTargetTwice = false;
this->BorlandMakeCurlyHack = false;
- this->NoMultiOutputMultiDepRules = false;
}
//----------------------------------------------------------------------------
@@ -600,7 +599,6 @@ const std::string &cmLocalUnixMakefileGenerator3::GetHomeRelativeOutputPath()
return this->HomeRelativeOutputPath;
}
-
//----------------------------------------------------------------------------
void
cmLocalUnixMakefileGenerator3
@@ -619,30 +617,6 @@ cmLocalUnixMakefileGenerator3
comment);
return;
}
- std::vector<std::string> outputs(1, target);
- this->WriteMakeRule(os, comment,
- outputs, depends, commands,
- symbolic, in_help);
-}
-
-//----------------------------------------------------------------------------
-void
-cmLocalUnixMakefileGenerator3
-::WriteMakeRule(std::ostream& os,
- const char* comment,
- const std::vector<std::string>& outputs,
- const std::vector<std::string>& depends,
- const std::vector<std::string>& commands,
- bool symbolic,
- bool in_help)
-{
- // Make sure there is an output.
- if(outputs.empty())
- {
- cmSystemTools::Error("No outputs for WriteMakeRule! called with comment: ",
- comment);
- return;
- }
std::string replace;
@@ -661,17 +635,7 @@ cmLocalUnixMakefileGenerator3
}
// Construct the left hand side of the rule.
- std::string tgt;
- {
- const char* sep = "";
- for (std::vector<std::string>::const_iterator i = outputs.begin();
- i != outputs.end(); ++i)
- {
- tgt += sep;
- tgt += this->Convert(*i,HOME_OUTPUT,MAKERULE);
- sep = " ";
- }
- }
+ std::string tgt = this->Convert(target, HOME_OUTPUT, MAKERULE);
const char* space = "";
if(tgt.size() == 1)
@@ -697,19 +661,6 @@ cmLocalUnixMakefileGenerator3
// No dependencies. The commands will always run.
os << cmMakeSafe(tgt) << space << ":\n";
}
- else if(this->NoMultiOutputMultiDepRules && outputs.size() >= 2)
- {
- // Borland make does not understand multiple dependency rules when
- // there are multiple outputs, so write them all on one line.
- os << cmMakeSafe(tgt) << space << ":";
- for(std::vector<std::string>::const_iterator dep = depends.begin();
- dep != depends.end(); ++dep)
- {
- replace = this->Convert(*dep, HOME_OUTPUT, MAKERULE);
- os << " " << cmMakeSafe(replace);
- }
- os << "\n";
- }
else
{
// Split dependencies into multiple rule lines. This allows for
@@ -733,8 +684,7 @@ cmLocalUnixMakefileGenerator3
// Add the output to the local help if requested.
if(in_help)
{
- this->LocalHelp.insert(this->LocalHelp.end(),
- outputs.begin(), outputs.end());
+ this->LocalHelp.push_back(target);
}
}
@@ -1754,8 +1704,6 @@ cmLocalUnixMakefileGenerator3
//----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::CheckMultipleOutputs(bool verbose)
{
- // Nothing populates multiple output pairs anymore, but we need to
- // honor it when working in a build tree generated by an older CMake.
cmMakefile* mf = this->Makefile;
// Get the string listing the multiple output pairs.