summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator2.cxx
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2005-05-11 17:16:45 (GMT)
committerKen Martin <ken.martin@kitware.com>2005-05-11 17:16:45 (GMT)
commitc85069b290922572f9ef15a06ec1d0d0be3adaaa (patch)
tree8ba1f7b378a0295cea5f550cd8fcb76cb676985e /Source/cmLocalUnixMakefileGenerator2.cxx
parent25d6c04add53631d6506674c3584fc0d8a6e0d46 (diff)
downloadCMake-c85069b290922572f9ef15a06ec1d0d0be3adaaa.zip
CMake-c85069b290922572f9ef15a06ec1d0d0be3adaaa.tar.gz
CMake-c85069b290922572f9ef15a06ec1d0d0be3adaaa.tar.bz2
ENH: some changes to the depends signature to be more flexible
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator2.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx23
1 files changed, 16 insertions, 7 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index bf2a3c5..4a8f6e2 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -3102,21 +3102,27 @@ cmLocalUnixMakefileGenerator2::GetDependsChecker(const std::string& lang,
const char* objFile,
bool verbose)
{
+ cmDepends *ret = 0;
if(lang == "C" || lang == "CXX" || lang == "RC")
{
- return new cmDependsC(dir, objFile, verbose);
+ ret = new cmDependsC();
}
#ifdef CMAKE_BUILD_WITH_CMAKE
else if(lang == "Fortran")
{
- return new cmDependsFortran(dir, objFile, verbose);
+ ret = new cmDependsFortran();
}
else if(lang == "Java")
{
- return new cmDependsJava(dir, objFile, verbose);
+ ret = new cmDependsJava();
}
#endif
- return 0;
+ if (ret)
+ {
+ ret->SetTargetFile(dir, objFile, ".depends",".depends.make");
+ ret->SetVerbose(verbose);
+ }
+ return ret;
}
//----------------------------------------------------------------------------
@@ -3201,19 +3207,22 @@ cmLocalUnixMakefileGenerator2
if(lang == "C" || lang == "CXX" || lang == "RC")
{
// TODO: Handle RC (resource files) dependencies correctly.
- cmDependsC scanner(".", objFile, srcFile, includes,
+ cmDependsC scanner(srcFile, includes,
includeRegexScan.c_str(), includeRegexComplain.c_str());
+ scanner.SetTargetFile(".",objFile,".depends",".depends.make");
return scanner.Write();
}
#ifdef CMAKE_BUILD_WITH_CMAKE
else if(lang == "Fortran")
{
- cmDependsFortran scanner(".", objFile, srcFile, includes);
+ cmDependsFortran scanner(srcFile, includes);
+ scanner.SetTargetFile(".",objFile,".depends",".depends.make");
return scanner.Write();
}
else if(lang == "Java")
{
- cmDependsJava scanner(".", objFile, srcFile);
+ cmDependsJava scanner(srcFile);
+ scanner.SetTargetFile(".",objFile,".depends",".depends.make");
return scanner.Write();
}
#endif