|
|
@@ -76,7 +76,7 @@ public:
|
|
|
bool VariableUsed(const char* ) const;
|
|
|
/** Return whether compatibility features needed for a version of
|
|
|
the cache or lower should be enabled. */
|
|
|
- bool NeedCacheCompatibility(int major, int minor);
|
|
|
+ bool NeedCacheCompatibility(int major, int minor) const;
|
|
|
|
|
|
/**
|
|
|
* Construct an empty makefile.
|
|
|
@@ -149,7 +149,7 @@ public:
|
|
|
* Help enforce global target name uniqueness.
|
|
|
*/
|
|
|
bool EnforceUniqueName(std::string const& name, std::string& msg,
|
|
|
- bool isCustom = false);
|
|
|
+ bool isCustom = false) const;
|
|
|
|
|
|
/**
|
|
|
* Perform FinalPass, Library dependency analysis etc before output of the
|
|
|
@@ -165,7 +165,7 @@ public:
|
|
|
/**
|
|
|
* Print the object state to std::cout.
|
|
|
*/
|
|
|
- void Print();
|
|
|
+ void Print() const;
|
|
|
|
|
|
/** Add a custom command to the build. */
|
|
|
void AddCustomCommandToTarget(const char* target,
|
|
|
@@ -498,7 +498,7 @@ public:
|
|
|
{
|
|
|
this->ComplainFileRegularExpression = regex;
|
|
|
}
|
|
|
- const char* GetComplainRegularExpression()
|
|
|
+ const char* GetComplainRegularExpression() const
|
|
|
{
|
|
|
return this->ComplainFileRegularExpression.c_str();
|
|
|
}
|
|
|
@@ -532,9 +532,9 @@ public:
|
|
|
/** Find a target to use in place of the given name. The target
|
|
|
returned may be imported or built within the project. */
|
|
|
cmTarget* FindTargetToUse(const std::string& name,
|
|
|
- bool excludeAliases = false);
|
|
|
- bool IsAlias(const std::string& name);
|
|
|
- cmGeneratorTarget* FindGeneratorTargetToUse(const char* name);
|
|
|
+ bool excludeAliases = false) const;
|
|
|
+ bool IsAlias(const std::string& name) const;
|
|
|
+ cmGeneratorTarget* FindGeneratorTargetToUse(const char* name) const;
|
|
|
|
|
|
/**
|
|
|
* Mark include directories as system directories.
|
|
|
@@ -550,12 +550,12 @@ public:
|
|
|
*/
|
|
|
void ExpandSourceListArguments(std::vector<std::string> const& argsIn,
|
|
|
std::vector<std::string>& argsOut,
|
|
|
- unsigned int startArgumentIndex);
|
|
|
+ unsigned int startArgumentIndex) const;
|
|
|
|
|
|
/** Get a cmSourceFile pointer for a given source name, if the name is
|
|
|
* not found, then a null pointer is returned.
|
|
|
*/
|
|
|
- cmSourceFile* GetSource(const char* sourceName);
|
|
|
+ cmSourceFile* GetSource(const char* sourceName) const;
|
|
|
|
|
|
/** Get a cmSourceFile pointer for a given source name, if the name is
|
|
|
* not found, then create the source file and return it. generated
|
|
|
@@ -568,7 +568,7 @@ public:
|
|
|
/**
|
|
|
* Obtain a list of auxiliary source directories.
|
|
|
*/
|
|
|
- std::vector<std::string>& GetAuxSourceDirectories()
|
|
|
+ const std::vector<std::string>& GetAuxSourceDirectories() const
|
|
|
{return this->AuxSourceDirectories;}
|
|
|
|
|
|
//@{
|
|
|
@@ -613,13 +613,13 @@ public:
|
|
|
/**
|
|
|
* Get a list of preprocessor define flags.
|
|
|
*/
|
|
|
- const char* GetDefineFlags()
|
|
|
+ const char* GetDefineFlags() const
|
|
|
{return this->DefineFlags.c_str();}
|
|
|
|
|
|
/**
|
|
|
* Make sure CMake can write this file
|
|
|
*/
|
|
|
- bool CanIWriteThisFile(const char* fileName);
|
|
|
+ bool CanIWriteThisFile(const char* fileName) const;
|
|
|
|
|
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
|
|
/**
|
|
|
@@ -644,10 +644,7 @@ public:
|
|
|
{ this->ListFiles.push_back(file);}
|
|
|
void AddCMakeDependFilesFromUser();
|
|
|
|
|
|
- /**
|
|
|
- * Get the list file stack as a string
|
|
|
- */
|
|
|
- std::string GetListFileStack();
|
|
|
+ std::string GetListFileStack() const;
|
|
|
|
|
|
/**
|
|
|
* Get the current context backtrace.
|
|
|
@@ -669,14 +666,14 @@ public:
|
|
|
* entry in the this->Definitions map. Also \@var\@ is
|
|
|
* expanded to match autoconf style expansions.
|
|
|
*/
|
|
|
- const char *ExpandVariablesInString(std::string& source);
|
|
|
+ const char *ExpandVariablesInString(std::string& source) const;
|
|
|
const char *ExpandVariablesInString(std::string& source, bool escapeQuotes,
|
|
|
bool noEscapes,
|
|
|
bool atOnly = false,
|
|
|
const char* filename = 0,
|
|
|
long line = -1,
|
|
|
bool removeEmpty = false,
|
|
|
- bool replaceAt = true);
|
|
|
+ bool replaceAt = true) const;
|
|
|
|
|
|
/**
|
|
|
* Remove any remaining variables in the string. Anything with ${var} or
|
|
|
@@ -716,7 +713,7 @@ public:
|
|
|
/**
|
|
|
* Print a command's invocation
|
|
|
*/
|
|
|
- void PrintCommandTrace(const cmListFileFunction& lff);
|
|
|
+ void PrintCommandTrace(const cmListFileFunction& lff) const;
|
|
|
|
|
|
/**
|
|
|
* Execute a single CMake command. Returns true if the command
|
|
|
@@ -752,14 +749,14 @@ public:
|
|
|
#endif
|
|
|
|
|
|
///! Display progress or status message.
|
|
|
- void DisplayStatus(const char*, float);
|
|
|
+ void DisplayStatus(const char*, float) const;
|
|
|
|
|
|
/**
|
|
|
* Expand the given list file arguments into the full set after
|
|
|
* variable replacement and list expansion.
|
|
|
*/
|
|
|
bool ExpandArguments(std::vector<cmListFileArgument> const& inArgs,
|
|
|
- std::vector<std::string>& outArgs);
|
|
|
+ std::vector<std::string>& outArgs) const;
|
|
|
/**
|
|
|
* Get the instance
|
|
|
*/
|
|
|
@@ -776,7 +773,7 @@ public:
|
|
|
* Is there a source file that has the provided source file as an output?
|
|
|
* if so then return it
|
|
|
*/
|
|
|
- cmSourceFile *GetSourceFileWithOutput(const char *outName);
|
|
|
+ cmSourceFile *GetSourceFileWithOutput(const char *outName) const;
|
|
|
|
|
|
/**
|
|
|
* Add a macro to the list of macros. The arguments should be name of the
|
|
|
@@ -800,7 +797,7 @@ public:
|
|
|
/**
|
|
|
* Return a location of a file in cmake or custom modules directory
|
|
|
*/
|
|
|
- std::string GetModulesFile(const char* name);
|
|
|
+ std::string GetModulesFile(const char* name) const;
|
|
|
|
|
|
///! Set/Get a property of this directory
|
|
|
void SetProperty(const char *prop, const char *value);
|
|
|
@@ -829,7 +826,7 @@ public:
|
|
|
|
|
|
void AddTestGenerator(cmTestGenerator* g)
|
|
|
{ if(g) this->TestGenerators.push_back(g); }
|
|
|
- std::vector<cmTestGenerator*>& GetTestGenerators()
|
|
|
+ const std::vector<cmTestGenerator*>& GetTestGenerators() const
|
|
|
{ return this->TestGenerators; }
|
|
|
|
|
|
// Define the properties
|
|
|
@@ -869,7 +866,7 @@ public:
|
|
|
return this->CompileDefinitionsEntries;
|
|
|
}
|
|
|
|
|
|
- bool IsGeneratingBuildSystem(){ return this->GeneratingBuildSystem; }
|
|
|
+ bool IsGeneratingBuildSystem() const { return this->GeneratingBuildSystem; }
|
|
|
void SetGeneratingBuildSystem(){ this->GeneratingBuildSystem = true; }
|
|
|
|
|
|
void AddQtUiFileWithOptions(cmSourceFile *sf);
|
|
|
@@ -950,7 +947,7 @@ private:
|
|
|
|
|
|
bool ParseDefineFlag(std::string const& definition, bool remove);
|
|
|
|
|
|
- bool EnforceUniqueDir(const char* srcPath, const char* binPath);
|
|
|
+ bool EnforceUniqueDir(const char* srcPath, const char* binPath) const;
|
|
|
|
|
|
friend class cmMakeDepend; // make depend needs direct access
|
|
|
// to the Sources array
|
|
|
@@ -973,7 +970,7 @@ private:
|
|
|
|
|
|
cmsys::RegularExpression cmDefineRegex;
|
|
|
cmsys::RegularExpression cmDefine01Regex;
|
|
|
- cmsys::RegularExpression cmAtVarRegex;
|
|
|
+ mutable cmsys::RegularExpression cmAtVarRegex;
|
|
|
|
|
|
cmPropertyMap Properties;
|
|
|
|
|
|
@@ -1028,7 +1025,7 @@ private:
|
|
|
bool CheckCMP0000;
|
|
|
|
|
|
// Enforce rules about CMakeLists.txt files.
|
|
|
- void EnforceDirectoryLevelRules();
|
|
|
+ void EnforceDirectoryLevelRules() const;
|
|
|
|
|
|
bool GeneratingBuildSystem;
|
|
|
/**
|
|
|
@@ -1037,7 +1034,7 @@ private:
|
|
|
* relative file paths. It is used as a fall back by
|
|
|
* GetSourceFileWithOutput(const char*).
|
|
|
*/
|
|
|
- cmSourceFile *LinearGetSourceFileWithOutput(const char *cname);
|
|
|
+ cmSourceFile *LinearGetSourceFileWithOutput(const char *cname) const;
|
|
|
|
|
|
// A map for fast output to input look up.
|
|
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|