ENH: some more cleanup

This commit is contained in:
Ken Martin 2005-05-09 08:53:38 -04:00
parent 20f668c6fe
commit 5fb21a0640
2 changed files with 12 additions and 9 deletions

View File

@ -868,7 +868,7 @@ cmLocalUnixMakefileGenerator3
std::auto_ptr<cmDepends> std::auto_ptr<cmDepends>
checker(this->GetDependsChecker(lang, checker(this->GetDependsChecker(lang,
m_Makefile->GetStartOutputDirectory(), m_Makefile->GetStartOutputDirectory(),
objFile)); objFile, false));
if(checker.get()) if(checker.get())
{ {
// Save the make and mark file names. // Save the make and mark file names.
@ -2713,20 +2713,21 @@ cmLocalUnixMakefileGenerator3
cmDepends* cmDepends*
cmLocalUnixMakefileGenerator3::GetDependsChecker(const std::string& lang, cmLocalUnixMakefileGenerator3::GetDependsChecker(const std::string& lang,
const char* dir, const char* dir,
const char* objFile) const char* objFile,
bool verbose)
{ {
if(lang == "C" || lang == "CXX" || lang == "RC") if(lang == "C" || lang == "CXX" || lang == "RC")
{ {
return new cmDependsC(dir, objFile); return new cmDependsC(dir, objFile, verbose);
} }
#ifdef CMAKE_BUILD_WITH_CMAKE #ifdef CMAKE_BUILD_WITH_CMAKE
else if(lang == "Fortran") else if(lang == "Fortran")
{ {
return new cmDependsFortran(dir, objFile); return new cmDependsFortran(dir, objFile, verbose);
} }
else if(lang == "Java") else if(lang == "Java")
{ {
return new cmDependsJava(dir, objFile); return new cmDependsJava(dir, objFile, verbose);
} }
#endif #endif
return 0; return 0;
@ -2834,7 +2835,8 @@ cmLocalUnixMakefileGenerator3
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void cmLocalUnixMakefileGenerator3::CheckDependencies(cmMakefile* mf) void cmLocalUnixMakefileGenerator3::CheckDependencies(cmMakefile* mf,
bool verbose)
{ {
// Get the list of languages that may have sources to check. // Get the list of languages that may have sources to check.
const char* langDef = mf->GetDefinition("CMAKE_DEPENDS_LANGUAGES"); const char* langDef = mf->GetDefinition("CMAKE_DEPENDS_LANGUAGES");
@ -2863,7 +2865,7 @@ void cmLocalUnixMakefileGenerator3::CheckDependencies(cmMakefile* mf)
// Construct a checker for the given language. // Construct a checker for the given language.
std::auto_ptr<cmDepends> std::auto_ptr<cmDepends>
checker(cmLocalUnixMakefileGenerator3 checker(cmLocalUnixMakefileGenerator3
::GetDependsChecker(*l, ".", f->c_str())); ::GetDependsChecker(*l, ".", f->c_str(), verbose));
if(checker.get()) if(checker.get())
{ {
checker->Check(); checker->Check();

View File

@ -119,7 +119,7 @@ public:
static bool ScanDependencies(std::vector<std::string> const& args); static bool ScanDependencies(std::vector<std::string> const& args);
/** Called from command-line hook to check dependencies. */ /** Called from command-line hook to check dependencies. */
static void CheckDependencies(cmMakefile* mf); static void CheckDependencies(cmMakefile* mf, bool verbose);
/** write some extra rules suahc as make test etc */ /** write some extra rules suahc as make test etc */
void WriteSpecialTargetsTop(std::ostream& makefileStream); void WriteSpecialTargetsTop(std::ostream& makefileStream);
@ -200,7 +200,8 @@ protected:
// return the appropriate depends checker // return the appropriate depends checker
static cmDepends* GetDependsChecker(const std::string& lang, static cmDepends* GetDependsChecker(const std::string& lang,
const char* dir, const char* dir,
const char* objFile); const char* objFile,
bool verbose);
void GenerateCustomRuleFile(const cmCustomCommand& cc); void GenerateCustomRuleFile(const cmCustomCommand& cc);