diff options
author | Brad King <brad.king@kitware.com> | 2020-04-10 15:30:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-13 15:03:00 (GMT) |
commit | 1639ee70ef7986c4c6ad72db1b2552bcaa5b88fa (patch) | |
tree | e510ecf4801fa2a814df41cc9d5680b0ef0876cb | |
parent | 413d26030f559c9871d94b7c99cda305d53525c8 (diff) | |
download | CMake-1639ee70ef7986c4c6ad72db1b2552bcaa5b88fa.zip CMake-1639ee70ef7986c4c6ad72db1b2552bcaa5b88fa.tar.gz CMake-1639ee70ef7986c4c6ad72db1b2552bcaa5b88fa.tar.bz2 |
cmDepends: Update types to always use a Makefile generator
We only use these classes with a `cmLocalUnixMakefileGenerator3`.
Construct using that type instead of just `cmLocalGenerator` so
that the Makefile-specific methods are available.
-rw-r--r-- | Source/cmDepends.cxx | 4 | ||||
-rw-r--r-- | Source/cmDepends.h | 12 | ||||
-rw-r--r-- | Source/cmDependsC.cxx | 7 | ||||
-rw-r--r-- | Source/cmDependsC.h | 4 | ||||
-rw-r--r-- | Source/cmDependsFortran.cxx | 4 | ||||
-rw-r--r-- | Source/cmDependsFortran.h | 4 |
6 files changed, 20 insertions, 15 deletions
diff --git a/Source/cmDepends.cxx b/Source/cmDepends.cxx index d4e8da6..d8aa730 100644 --- a/Source/cmDepends.cxx +++ b/Source/cmDepends.cxx @@ -9,12 +9,12 @@ #include "cmFileTime.h" #include "cmFileTimeCache.h" #include "cmGeneratedFileStream.h" -#include "cmLocalGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" -cmDepends::cmDepends(cmLocalGenerator* lg, std::string targetDir) +cmDepends::cmDepends(cmLocalUnixMakefileGenerator3* lg, std::string targetDir) : LocalGenerator(lg) , TargetDirectory(std::move(targetDir)) { diff --git a/Source/cmDepends.h b/Source/cmDepends.h index d938775..8cf528f 100644 --- a/Source/cmDepends.h +++ b/Source/cmDepends.h @@ -12,7 +12,7 @@ #include <vector> class cmFileTimeCache; -class cmLocalGenerator; +class cmLocalUnixMakefileGenerator3; /** \class cmDepends * \brief Dependency scanner superclass. @@ -29,7 +29,8 @@ public: public: /** Instances need to know the build directory name and the relative path from the build directory to the target file. */ - cmDepends(cmLocalGenerator* lg = nullptr, std::string targetDir = ""); + cmDepends(cmLocalUnixMakefileGenerator3* lg = nullptr, + std::string targetDir = ""); cmDepends(cmDepends const&) = delete; cmDepends& operator=(cmDepends const&) = delete; @@ -38,7 +39,10 @@ public: scanning dependencies. This is not a full local generator; it has been setup to do relative path conversions for the current directory. */ - void SetLocalGenerator(cmLocalGenerator* lg) { this->LocalGenerator = lg; } + void SetLocalGenerator(cmLocalUnixMakefileGenerator3* lg) + { + this->LocalGenerator = lg; + } /** Set the specific language to be scanned. */ void SetLanguage(const std::string& lang) { this->Language = lang; } @@ -92,7 +96,7 @@ protected: std::ostream& internalDepends); // The local generator. - cmLocalGenerator* LocalGenerator; + cmLocalUnixMakefileGenerator3* LocalGenerator; // Flag for verbose output. bool Verbose = false; diff --git a/Source/cmDependsC.cxx b/Source/cmDependsC.cxx index 01bb6ed..0748c65 100644 --- a/Source/cmDependsC.cxx +++ b/Source/cmDependsC.cxx @@ -7,7 +7,7 @@ #include "cmsys/FStream.hxx" #include "cmFileTime.h" -#include "cmLocalGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" @@ -22,8 +22,9 @@ cmDependsC::cmDependsC() = default; -cmDependsC::cmDependsC(cmLocalGenerator* lg, const std::string& targetDir, - const std::string& lang, const DependencyMap* validDeps) +cmDependsC::cmDependsC(cmLocalUnixMakefileGenerator3* lg, + const std::string& targetDir, const std::string& lang, + const DependencyMap* validDeps) : cmDepends(lg, targetDir) , ValidDeps(validDeps) { diff --git a/Source/cmDependsC.h b/Source/cmDependsC.h index 868c94a..e01faa4 100644 --- a/Source/cmDependsC.h +++ b/Source/cmDependsC.h @@ -16,7 +16,7 @@ #include "cmDepends.h" -class cmLocalGenerator; +class cmLocalUnixMakefileGenerator3; /** \class cmDependsC * \brief Dependency scanner for C and C++ object files. @@ -27,7 +27,7 @@ public: /** Checking instances need to know the build directory name and the relative path from the build directory to the target file. */ cmDependsC(); - cmDependsC(cmLocalGenerator* lg, const std::string& targetDir, + cmDependsC(cmLocalUnixMakefileGenerator3* lg, const std::string& targetDir, const std::string& lang, const DependencyMap* validDeps); /** Virtual destructor to cleanup subclasses properly. */ diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index 666306c..fe3411d 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -12,7 +12,7 @@ #include "cmFortranParser.h" /* Interface to parser object. */ #include "cmGeneratedFileStream.h" -#include "cmLocalGenerator.h" +#include "cmLocalUnixMakefileGenerator3.h" #include "cmMakefile.h" #include "cmOutputConverter.h" #include "cmStateDirectory.h" @@ -72,7 +72,7 @@ public: cmDependsFortran::cmDependsFortran() = default; -cmDependsFortran::cmDependsFortran(cmLocalGenerator* lg) +cmDependsFortran::cmDependsFortran(cmLocalUnixMakefileGenerator3* lg) : cmDepends(lg) , Internal(new cmDependsFortranInternals) { diff --git a/Source/cmDependsFortran.h b/Source/cmDependsFortran.h index e3e0d05..3e306dd 100644 --- a/Source/cmDependsFortran.h +++ b/Source/cmDependsFortran.h @@ -15,7 +15,7 @@ class cmDependsFortranInternals; class cmFortranSourceInfo; -class cmLocalGenerator; +class cmLocalUnixMakefileGenerator3; /** \class cmDependsFortran * \brief Dependency scanner for Fortran object files. @@ -31,7 +31,7 @@ public: path from the build directory to the target file, the source file from which to start scanning, the include file search path, and the target directory. */ - cmDependsFortran(cmLocalGenerator* lg); + cmDependsFortran(cmLocalUnixMakefileGenerator3* lg); /** Virtual destructor to cleanup subclasses properly. */ ~cmDependsFortran() override; |