summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-05 20:35:24 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-05 20:35:24 (GMT)
commit179943bf14c2553d3a419bc1a80aca9017fdc287 (patch)
tree41bdd65e2b738472a75b746b40ac60c7181ddb80
parenteab5a4350d45fe228ad143cf481c52c26feacef3 (diff)
downloadCMake-179943bf14c2553d3a419bc1a80aca9017fdc287.zip
CMake-179943bf14c2553d3a419bc1a80aca9017fdc287.tar.gz
CMake-179943bf14c2553d3a419bc1a80aca9017fdc287.tar.bz2
STYLE: move ForceVerboseMakefiles to cmGlobalUnixMakefileGenerator3, so the
kdevelop generator doesn't need its own CreateLocalGenerator() anymore Alex
-rw-r--r--Source/cmGlobalKdevelopGenerator.cxx10
-rw-r--r--Source/cmGlobalKdevelopGenerator.h3
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx2
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.h12
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx7
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h10
6 files changed, 18 insertions, 26 deletions
diff --git a/Source/cmGlobalKdevelopGenerator.cxx b/Source/cmGlobalKdevelopGenerator.cxx
index 44526db..d3575be 100644
--- a/Source/cmGlobalKdevelopGenerator.cxx
+++ b/Source/cmGlobalKdevelopGenerator.cxx
@@ -31,15 +31,7 @@ cmGlobalKdevelopGenerator::cmGlobalKdevelopGenerator()
this->ForceUnixPaths = true;
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
this->ToolSupportsColor = false;
-}
-
-///! Create a local generator appropriate to this Global Generator
-cmLocalGenerator *cmGlobalKdevelopGenerator::CreateLocalGenerator()
-{
- cmLocalUnixMakefileGenerator3 *lg = new cmLocalUnixMakefileGenerator3;
- lg->SetForceVerboseMakefiles(true);
- lg->SetGlobalGenerator(this);
- return lg;
+ this->SetForceVerboseMakefiles(true);
}
//----------------------------------------------------------------------------
diff --git a/Source/cmGlobalKdevelopGenerator.h b/Source/cmGlobalKdevelopGenerator.h
index 5f71e72..240b954 100644
--- a/Source/cmGlobalKdevelopGenerator.h
+++ b/Source/cmGlobalKdevelopGenerator.h
@@ -45,9 +45,6 @@ public:
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
- ///! Create a local generator appropriate to this Global Generator
- virtual cmLocalGenerator *CreateLocalGenerator();
-
/**
* Generate the all required files for building this project/tree. This
* basically creates a series of LocalGenerators for each directory and
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 6d4da98..ef6fa90 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -29,6 +29,8 @@ cmGlobalUnixMakefileGenerator3::cmGlobalUnixMakefileGenerator3()
this->ForceUnixPaths = true;
this->FindMakeProgramFile = "CMakeUnixFindMake.cmake";
this->ToolSupportsColor = true;
+ this->ForceVerboseMakefiles = false;
+
#ifdef _WIN32
this->UseLinkScript = false;
#else
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 5c20b3d..8fd2f2b 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -132,6 +132,17 @@ public:
unsigned long GetNumberOfProgressActionsInAll
(cmLocalUnixMakefileGenerator3 *lg);
+ /** Get whether the generator should use a script for link commands. */
+ bool GetForceVerboseMakefiles() { return this->ForceVerboseMakefiles; }
+ /**
+ * If set to true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have
+ * anymore. Set it to true when writing a generator where short output
+ * doesn't make sense, e.g. because the full output is parsed by an
+ * IDE/editor.
+ */
+ void SetForceVerboseMakefiles(bool enable)
+ {this->ForceVerboseMakefiles=enable;}
+
protected:
void WriteMainMakefile2();
void WriteMainCMakefile();
@@ -185,6 +196,7 @@ protected:
MultipleOutputPairsType MultipleOutputPairs;
std::map<cmStdString, int > TargetSourceFileCount;
+ bool ForceVerboseMakefiles;
};
#endif
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index bd8949d..e60a5d2 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -47,7 +47,6 @@ cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
this->PassMakeflags = false;
this->DefineWindowsNULL = false;
this->UnixCD = true;
- this->ForceVerboseMakefiles=false;
this->ColorMakefile = false;
this->SkipPreprocessedSourceRules = false;
this->SkipAssemblySourceRules = false;
@@ -678,6 +677,8 @@ cmLocalUnixMakefileGenerator3
this->WriteMakeRule(makefileStream, 0,
".SUFFIXES", depends, no_commands, false);
+ cmGlobalUnixMakefileGenerator3* gg =
+ static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
// Write special target to silence make output. This must be after
// the default target in case VERBOSE is set (which changes the
// name). The setting of CMAKE_VERBOSE_MAKEFILE to ON will cause a
@@ -685,7 +686,7 @@ cmLocalUnixMakefileGenerator3
// name of this special target. This gives a make-time choice to
// the user.
if((this->Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
- || (this->ForceVerboseMakefiles))
+ || (gg->GetForceVerboseMakefiles()))
{
makefileStream
<< "# Produce verbose output by default.\n"
@@ -707,8 +708,6 @@ cmLocalUnixMakefileGenerator3
// Work-around for makes that drop rules that have no dependencies
// or commands.
- cmGlobalUnixMakefileGenerator3* gg =
- static_cast<cmGlobalUnixMakefileGenerator3*>(this->GlobalGenerator);
std::string hack = gg->GetEmptyRuleHackDepends();
if(!hack.empty())
{
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index 4eeadd6..243b9b1 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -129,15 +129,6 @@ public:
void SetSilentNoColon(bool v) {this->SilentNoColon = v;}
/**
- * If set to true, the CMake variable CMAKE_VERBOSE_MAKEFILES doesn't have
- * anymore. Set it to true when writing a generator where short output
- * doesn't make sense, e.g. because the full output is parsed by an
- * IDE/editor.
- */
- void SetForceVerboseMakefiles(bool enable)
- {this->ForceVerboseMakefiles=enable;}
-
- /**
* Set the command to use for native make shell echo. The value
* should include all parts of the command up to the beginning of
* the message (including a whitespace separator).
@@ -325,7 +316,6 @@ protected:
const std::vector<std::string>& files,
cmTarget& target, const char* filename =0);
- bool ForceVerboseMakefiles;
std::map<cmStdString, std::vector<int> > ProgressFiles;
private: