diff --git a/Source/cmMSProjectGenerator.cxx b/Source/cmMSProjectGenerator.cxx index 5fb546a9e..9a6f4f1ea 100644 --- a/Source/cmMSProjectGenerator.cxx +++ b/Source/cmMSProjectGenerator.cxx @@ -69,3 +69,7 @@ cmMSProjectGenerator::~cmMSProjectGenerator() delete m_DSWMakefile; } +void cmMSProjectGenerator::SetLocal(bool local) +{ + m_BuildDSW = !local; +} diff --git a/Source/cmMSProjectGenerator.h b/Source/cmMSProjectGenerator.h index b80e03bca..a4f568b93 100644 --- a/Source/cmMSProjectGenerator.h +++ b/Source/cmMSProjectGenerator.h @@ -70,20 +70,21 @@ public: */ virtual void GenerateMakefile(); + //! controls the DSW/DSP settings + virtual void SetLocal(bool); + /** * Turn off the generation of a Microsoft Visual C++ DSW file. * This causes only the dsp file to be created. This * is used to run as a command line program from inside visual * studio. */ - void BuildDSWOff() - {m_BuildDSW = false;} + void BuildDSWOff() {m_BuildDSW = false;} /** * Turn on the generation of a Microsoft Visual C++ DSW file. */ - void BuildDSWOn() - {m_BuildDSW = true;} + void BuildDSWOn() {m_BuildDSW = true;} /** * Retrieve a pointer to a cmDSWMakefile instance. diff --git a/Source/cmMakefileGenerator.h b/Source/cmMakefileGenerator.h index fec80a2b5..72832b270 100644 --- a/Source/cmMakefileGenerator.h +++ b/Source/cmMakefileGenerator.h @@ -67,6 +67,15 @@ public: */ virtual void GenerateMakefile() = 0; + /** + * The local setting indicates that the generator is producing a + * fully configured makefile in the current directory. In Microsoft + * terms it is producing a DSP file if local is true and a DSW file + * if local is false. On UNIX when local is false it skips the + * dependecy check and recurses the full tree building the structure + */ + virtual void SetLocal(bool ) {}; + protected: cmMakefile* m_Makefile; }; diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index 71936d54f..081a6c974 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -875,3 +875,17 @@ void cmUnixMakefileGenerator::OutputMakeRule(std::ostream& fout, } + +void cmUnixMakefileGenerator::SetLocal (bool local) +{ + if (local) + { + m_CacheOnly = false; + m_Recurse = false; + } + else + { + m_CacheOnly = true; + m_Recurse = true; + } +} diff --git a/Source/cmUnixMakefileGenerator.h b/Source/cmUnixMakefileGenerator.h index 0188d8adc..81990175c 100644 --- a/Source/cmUnixMakefileGenerator.h +++ b/Source/cmUnixMakefileGenerator.h @@ -55,7 +55,10 @@ class cmUnixMakefileGenerator : public cmMakefileGenerator public: ///! Set cache only and recurse to false by default. cmUnixMakefileGenerator(); - + + //! just sets the Cache Only and Recurse flags + virtual void SetLocal(bool local); + /** * If cache only is on. * and only stub makefiles are generated, and no depends, for speed.