mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-20 04:24:36 +08:00
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.
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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. */
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user