BUG: Work-around Watcom WMake limitation for multiple-output custom command support.
This commit is contained in:
parent
bfaff96645
commit
b323c3f51c
|
@ -110,6 +110,9 @@ public:
|
||||||
check-build-system step. */
|
check-build-system step. */
|
||||||
virtual void CheckMultipleOutputs(cmMakefile* mf, bool verbose);
|
virtual void CheckMultipleOutputs(cmMakefile* mf, bool verbose);
|
||||||
|
|
||||||
|
/** Get the command to use for a non-symbolic target file that has
|
||||||
|
no rule. This is used for multiple output dependencies. */
|
||||||
|
std::string GetEmptyCommandHack() { return this->EmptyCommandsHack; }
|
||||||
protected:
|
protected:
|
||||||
void WriteMainMakefile2();
|
void WriteMainMakefile2();
|
||||||
void WriteMainCMakefile();
|
void WriteMainCMakefile();
|
||||||
|
@ -151,6 +154,12 @@ protected:
|
||||||
// that can be added.
|
// that can be added.
|
||||||
std::string EmptyRuleHackDepends;
|
std::string EmptyRuleHackDepends;
|
||||||
|
|
||||||
|
// Some make programs (Watcom) do not like rules with no commands
|
||||||
|
// for non-symbolic targets. If non-empty this variable holds a
|
||||||
|
// bogus command that may be put in the rule to satisfy the make
|
||||||
|
// program.
|
||||||
|
std::string EmptyCommandsHack;
|
||||||
|
|
||||||
typedef std::map<cmStdString, cmStdString> MultipleOutputPairsType;
|
typedef std::map<cmStdString, cmStdString> MultipleOutputPairsType;
|
||||||
MultipleOutputPairsType MultipleOutputPairs;
|
MultipleOutputPairsType MultipleOutputPairs;
|
||||||
};
|
};
|
||||||
|
|
|
@ -23,6 +23,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
|
||||||
this->FindMakeProgramFile = "CMakeFindWMake.cmake";
|
this->FindMakeProgramFile = "CMakeFindWMake.cmake";
|
||||||
this->ForceUnixPaths = false;
|
this->ForceUnixPaths = false;
|
||||||
this->ToolSupportsColorVT100 = false;
|
this->ToolSupportsColorVT100 = false;
|
||||||
|
this->EmptyCommandsHack = "@cd .";
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const& l,
|
void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const& l,
|
||||||
|
|
|
@ -660,6 +660,11 @@ void cmMakefileTargetGenerator
|
||||||
commands.clear();
|
commands.clear();
|
||||||
cmGlobalUnixMakefileGenerator3* gg =
|
cmGlobalUnixMakefileGenerator3* gg =
|
||||||
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
|
||||||
|
std::string emptyCommand = gg->GetEmptyCommandHack();
|
||||||
|
if(!emptyCommand.empty())
|
||||||
|
{
|
||||||
|
commands.push_back(emptyCommand);
|
||||||
|
}
|
||||||
for(++o; o != outputs.end(); ++o)
|
for(++o; o != outputs.end(); ++o)
|
||||||
{
|
{
|
||||||
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
|
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,
|
||||||
|
|
Loading…
Reference in New Issue