summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-04-13 14:15:48 (GMT)
committerBrad King <brad.king@kitware.com>2006-04-13 14:15:48 (GMT)
commitb323c3f51cc4caf7f8c26f86ba3dd4a08e964c4b (patch)
treee0105163011be2cb5f379d8920b840497e66100b
parentbfaff96645276d93be9d509adfec7ff811402427 (diff)
downloadCMake-b323c3f51cc4caf7f8c26f86ba3dd4a08e964c4b.zip
CMake-b323c3f51cc4caf7f8c26f86ba3dd4a08e964c4b.tar.gz
CMake-b323c3f51cc4caf7f8c26f86ba3dd4a08e964c4b.tar.bz2
BUG: Work-around Watcom WMake limitation for multiple-output custom command support.
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h9
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.cxx1
-rw-r--r--Source/cmMakefileTargetGenerator.cxx5
3 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 3f8dbc2..6ad6ec9 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -110,6 +110,9 @@ public:
check-build-system step. */
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:
void WriteMainMakefile2();
void WriteMainCMakefile();
@@ -151,6 +154,12 @@ protected:
// that can be added.
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;
MultipleOutputPairsType MultipleOutputPairs;
};
diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx
index fd3af68..a040484 100644
--- a/Source/cmGlobalWatcomWMakeGenerator.cxx
+++ b/Source/cmGlobalWatcomWMakeGenerator.cxx
@@ -23,6 +23,7 @@ cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
this->FindMakeProgramFile = "CMakeFindWMake.cmake";
this->ForceUnixPaths = false;
this->ToolSupportsColorVT100 = false;
+ this->EmptyCommandsHack = "@cd .";
}
void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const& l,
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index f2d3dc0..249db05 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -660,6 +660,11 @@ void cmMakefileTargetGenerator
commands.clear();
cmGlobalUnixMakefileGenerator3* gg =
static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
+ std::string emptyCommand = gg->GetEmptyCommandHack();
+ if(!emptyCommand.empty())
+ {
+ commands.push_back(emptyCommand);
+ }
for(++o; o != outputs.end(); ++o)
{
this->LocalGenerator->WriteMakeRule(*this->BuildFileStream, 0,