summaryrefslogtreecommitdiffstats
path: root/Source/cmDependsFortran.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2005-01-26 20:33:38 (GMT)
committerBrad King <brad.king@kitware.com>2005-01-26 20:33:38 (GMT)
commit19f977bad7261d9e8f8d6c5d2764c079d35cc014 (patch)
treefdafaf2f6202af5d14201fd1b81e9858e9209162 /Source/cmDependsFortran.h
parentaaac6f2c3ac9e9f95f0fdad7d77b4de21568ed52 (diff)
downloadCMake-19f977bad7261d9e8f8d6c5d2764c079d35cc014.zip
CMake-19f977bad7261d9e8f8d6c5d2764c079d35cc014.tar.gz
CMake-19f977bad7261d9e8f8d6c5d2764c079d35cc014.tar.bz2
ENH: Added Fortran dependency scanner implementation.
Diffstat (limited to 'Source/cmDependsFortran.h')
-rw-r--r--Source/cmDependsFortran.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h
new file mode 100644
index 0000000..7cd920d
--- /dev/null
+++ b/Source/cmDependsFortran.h
@@ -0,0 +1,64 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef cmDependsFortran_h
+#define cmDependsFortran_h
+
+#include "cmDepends.h"
+
+/** \class cmDependsFortran
+ * \brief Dependency scanner for Fortran object files.
+ */
+class cmDependsFortran: public cmDepends
+{
+public:
+ /** Checking instances need to know the build directory name and the
+ relative path from the build directory to the target file. */
+ cmDependsFortran(const char* dir, const char* targetFile);
+
+ /** Scanning need to know the build directory name, the relative
+ path from the build directory to the target file, the source
+ file from which to start scanning, and the include file search
+ path. */
+ cmDependsFortran(const char* dir, const char* targetFile,
+ const char* sourceFile, std::vector<std::string> const& includes);
+
+ /** Virtual destructor to cleanup subclasses properly. */
+ virtual ~cmDependsFortran();
+
+ /** Method to find an included file in the include path. Fortran
+ always searches the directory containing the including source
+ first. */
+ bool FindIncludeFile(const char* dir, const char* includeName,
+ std::string& fileName);
+
+protected:
+ // Implement writing/checking methods required by superclass.
+ virtual bool WriteDependencies(std::ostream& os);
+ virtual bool CheckDependencies(std::istream& is);
+
+ // The source file from which to start scanning.
+ std::string m_SourceFile;
+
+ // The include file search path.
+ std::vector<std::string> const* m_IncludePath;
+
+private:
+ cmDependsFortran(cmDependsFortran const&); // Purposely not implemented.
+ void operator=(cmDependsFortran const&); // Purposely not implemented.
+};
+
+#endif