summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-01-26 21:18:22 (GMT)
committerBrad King <brad.king@kitware.com>2005-01-26 21:18:22 (GMT)
commita81a8263a5932c1635e678d3b07305195bf1fa7c (patch)
tree7d923ab3dcb7c6dba9b241608eab98aa41ae8405 /Source
parent934346243ebfa1b9d861fda62d12222f7d969010 (diff)
downloadCMake-a81a8263a5932c1635e678d3b07305195bf1fa7c.zip
CMake-a81a8263a5932c1635e678d3b07305195bf1fa7c.tar.gz
CMake-a81a8263a5932c1635e678d3b07305195bf1fa7c.tar.bz2
ENH: Added hook into Fortran dependency scanner.
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt5
-rw-r--r--Source/cmLocalUnixMakefileGenerator2.cxx22
2 files changed, 26 insertions, 1 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 9ea72a4..982b964 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -55,6 +55,11 @@ SET(SRCS
cmDepends.cxx
cmDependsC.h
cmDependsC.cxx
+ cmDependsFortran.h
+ cmDependsFortran.cxx
+ cmDependsFortranLexer.c
+ cmDependsFortranParser.h
+ cmDependsFortranParser.c
)
diff --git a/Source/cmLocalUnixMakefileGenerator2.cxx b/Source/cmLocalUnixMakefileGenerator2.cxx
index 23a2e27..cfd61bf 100644
--- a/Source/cmLocalUnixMakefileGenerator2.cxx
+++ b/Source/cmLocalUnixMakefileGenerator2.cxx
@@ -17,12 +17,18 @@
#include "cmLocalUnixMakefileGenerator2.h"
#include "cmDepends.h"
-#include "cmDependsC.h"
#include "cmGeneratedFileStream.h"
#include "cmGlobalGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
+// Include dependency scanners for supported languages. Only the
+// C/C++ scanner is needed for bootstrapping CMake.
+#include "cmDependsC.h"
+#ifdef CMAKE_BUILD_WITH_CMAKE
+# include "cmDependsFortran.h"
+#endif
+
#include <memory> // auto_ptr
#include <queue>
@@ -2696,6 +2702,12 @@ cmLocalUnixMakefileGenerator2::GetDependsChecker(const std::string& lang,
{
return new cmDependsC(dir, objFile);
}
+#ifdef CMAKE_BUILD_WITH_CMAKE
+ else if(lang == "Fortran")
+ {
+ return new cmDependsFortran(dir, objFile);
+ }
+#endif
return 0;
}
@@ -2735,6 +2747,14 @@ cmLocalUnixMakefileGenerator2
scanner.Write();
return true;
}
+#ifdef CMAKE_BUILD_WITH_CMAKE
+ else if(lang == "Fortran")
+ {
+ cmDependsFortran scanner(".", objFile, srcFile, includes);
+ scanner.Write();
+ return true;
+ }
+#endif
return false;
}