Merge topic 'minor-cleanups'
c37cf7fa
cmCacheManager: Remove unused method64556e3d
cmCacheManager: Remove unused overloads.23bb5d22
cmCacheManager: Remove use of intermediate overload.510562e3
cmGlobalGenerator: Don't fetch the cache manager in a loop.629e9489
cmake: Clear member rather than explicit erase.d280bae9
cmake: Be clear that there is no chaining after global properties.364c7ea1
cmake: Remove unused method.47acfe1d
cmake: Remove unused member.a469bf7b
cmMakefile: Remove one wrong and one insufficiently helpful comment.257c1649
cmListFile: Remove unused member.fe17092c
cmMakefile: Remove bogus comment.199b28ac
Remove duplicate tag name.
This commit is contained in:
commit
9b7213dc47
|
@ -76,22 +76,10 @@ bool cmCacheManager::IsType(const char* s)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool cmCacheManager::LoadCache(cmMakefile* mf)
|
||||
{
|
||||
return this->LoadCache(mf->GetHomeOutputDirectory());
|
||||
}
|
||||
|
||||
|
||||
bool cmCacheManager::LoadCache(const std::string& path)
|
||||
{
|
||||
return this->LoadCache(path,true);
|
||||
}
|
||||
|
||||
bool cmCacheManager::LoadCache(const std::string& path,
|
||||
bool internal)
|
||||
{
|
||||
std::set<std::string> emptySet;
|
||||
return this->LoadCache(path, internal, emptySet, emptySet);
|
||||
return this->LoadCache(path, true, emptySet, emptySet);
|
||||
}
|
||||
|
||||
static bool ParseEntryWithoutType(const std::string& entry,
|
||||
|
@ -418,12 +406,6 @@ void cmCacheManager::WritePropertyEntries(std::ostream& os,
|
|||
}
|
||||
}
|
||||
|
||||
bool cmCacheManager::SaveCache(cmMakefile* mf)
|
||||
{
|
||||
return this->SaveCache(mf->GetHomeOutputDirectory());
|
||||
}
|
||||
|
||||
|
||||
bool cmCacheManager::SaveCache(const std::string& path)
|
||||
{
|
||||
std::string cacheFile = path;
|
||||
|
@ -914,21 +896,3 @@ bool cmCacheManager::CacheIterator::PropertyExists(
|
|||
{
|
||||
return this->GetProperty(prop)? true:false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmCacheManager::NeedCacheCompatibility(int major, int minor)
|
||||
{
|
||||
// Compatibility is not needed if the cache version is zero because
|
||||
// the cache was created or modified by the user.
|
||||
if(this->CacheMajorVersion == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Compatibility is needed if the cache version is equal to or lower
|
||||
// than the given version.
|
||||
cmIML_INT_uint64_t actual_compat =
|
||||
CMake_VERSION_ENCODE(this->CacheMajorVersion, this->CacheMinorVersion, 0);
|
||||
return (actual_compat &&
|
||||
actual_compat <= CMake_VERSION_ENCODE(major, minor, 0));
|
||||
}
|
||||
|
|
|
@ -105,17 +105,12 @@ public:
|
|||
static const char* TypeToString(CacheEntryType);
|
||||
static bool IsType(const char*);
|
||||
|
||||
///! Load a cache for given makefile. Loads from ouput home.
|
||||
bool LoadCache(cmMakefile*);
|
||||
///! Load a cache for given makefile. Loads from path/CMakeCache.txt.
|
||||
bool LoadCache(const std::string& path);
|
||||
bool LoadCache(const std::string& path, bool internal);
|
||||
bool LoadCache(const std::string& path, bool internal,
|
||||
std::set<std::string>& excludes,
|
||||
std::set<std::string>& includes);
|
||||
|
||||
///! Save cache for given makefile. Saves to ouput home CMakeCache.txt.
|
||||
bool SaveCache(cmMakefile*) ;
|
||||
///! Save cache for given makefile. Saves to ouput path/CMakeCache.txt
|
||||
bool SaveCache(const std::string& path) ;
|
||||
|
||||
|
@ -149,7 +144,6 @@ public:
|
|||
{ return this->CacheMajorVersion; }
|
||||
unsigned int GetCacheMinorVersion() const
|
||||
{ return this->CacheMinorVersion; }
|
||||
bool NeedCacheCompatibility(int major, int minor);
|
||||
|
||||
protected:
|
||||
///! Add an entry into the cache
|
||||
|
|
|
@ -1554,7 +1554,6 @@ class ArtifactPdbTag;
|
|||
|
||||
class ArtifactPathTag;
|
||||
class ArtifactDirTag;
|
||||
class ArtifactNameTag;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
template<typename ArtifactT>
|
||||
|
|
|
@ -1537,10 +1537,9 @@ void cmGlobalGenerator::CheckLocalGenerators()
|
|||
std::map<std::string, std::string> notFoundMap;
|
||||
// std::set<std::string> notFoundMap;
|
||||
// after it is all done do a ConfigureFinalPass
|
||||
cmCacheManager* manager = 0;
|
||||
cmCacheManager* manager = this->GetCMakeInstance()->GetCacheManager();
|
||||
for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i)
|
||||
{
|
||||
manager = this->LocalGenerators[i]->GetMakefile()->GetCacheManager();
|
||||
this->LocalGenerators[i]->ConfigureFinalPass();
|
||||
cmTargets &targets =
|
||||
this->LocalGenerators[i]->GetMakefile()->GetTargets();
|
||||
|
|
|
@ -146,18 +146,12 @@ bool cmListFile::ParseFile(const char* filename,
|
|||
}
|
||||
|
||||
bool parseError = false;
|
||||
this->ModifiedTime = cmSystemTools::ModifiedTime(filename);
|
||||
|
||||
{
|
||||
cmListFileParser parser(this, mf, filename);
|
||||
parseError = !parser.ParseFile();
|
||||
}
|
||||
|
||||
if(parseError)
|
||||
{
|
||||
this->ModifiedTime = 0;
|
||||
}
|
||||
|
||||
// do we need a cmake_policy(VERSION call?
|
||||
if(topLevel)
|
||||
{
|
||||
|
|
|
@ -85,15 +85,10 @@ class cmListFileBacktrace: public std::vector<cmListFileContext>
|
|||
|
||||
struct cmListFile
|
||||
{
|
||||
cmListFile()
|
||||
:ModifiedTime(0)
|
||||
{
|
||||
}
|
||||
bool ParseFile(const char* path,
|
||||
bool topLevel,
|
||||
cmMakefile *mf);
|
||||
|
||||
long int ModifiedTime;
|
||||
std::vector<cmListFileFunction> Functions;
|
||||
};
|
||||
|
||||
|
|
|
@ -184,11 +184,6 @@ unsigned int cmMakefile::GetCacheMinorVersion() const
|
|||
return this->GetCacheManager()->GetCacheMinorVersion();
|
||||
}
|
||||
|
||||
bool cmMakefile::NeedCacheCompatibility(int major, int minor) const
|
||||
{
|
||||
return this->GetCacheManager()->NeedCacheCompatibility(major, minor);
|
||||
}
|
||||
|
||||
cmMakefile::~cmMakefile()
|
||||
{
|
||||
cmDeleteAll(this->InstallGenerators);
|
||||
|
|
|
@ -78,9 +78,6 @@ public:
|
|||
bool VariableInitialized(const std::string& ) const;
|
||||
/* return true if a variable has been used */
|
||||
bool VariableUsed(const std::string& ) const;
|
||||
/** Return whether compatibility features needed for a version of
|
||||
the cache or lower should be enabled. */
|
||||
bool NeedCacheCompatibility(int major, int minor) const;
|
||||
|
||||
/**
|
||||
* Construct an empty makefile.
|
||||
|
@ -776,10 +773,6 @@ public:
|
|||
///enabled.
|
||||
void EnableLanguage(std::vector<std::string>const& languages, bool optional);
|
||||
|
||||
/**
|
||||
* Set/Get the name of the parent directories CMakeLists file
|
||||
* given a current CMakeLists file name
|
||||
*/
|
||||
cmCacheManager *GetCacheManager() const;
|
||||
|
||||
/**
|
||||
|
@ -985,9 +978,8 @@ protected:
|
|||
// directories.
|
||||
std::set<std::string> SystemIncludeDirectories;
|
||||
|
||||
std::vector<std::string> ListFiles; // list of command files loaded
|
||||
std::vector<std::string> OutputFiles; // list of command files loaded
|
||||
|
||||
std::vector<std::string> ListFiles;
|
||||
std::vector<std::string> OutputFiles;
|
||||
|
||||
cmTarget::LinkLibraryVectorType LinkLibraries;
|
||||
|
||||
|
|
|
@ -188,7 +188,6 @@ void cmake::InitializeProperties()
|
|||
{
|
||||
this->Properties.clear();
|
||||
this->Properties.SetCMakeInstance(this);
|
||||
this->AccessedProperties.clear();
|
||||
this->PropertyDefinitions.clear();
|
||||
|
||||
// initialize properties
|
||||
|
@ -213,7 +212,7 @@ void cmake::CleanupCommandsAndMacros()
|
|||
delete j->second;
|
||||
}
|
||||
}
|
||||
this->Commands.erase(this->Commands.begin(), this->Commands.end());
|
||||
this->Commands.clear();
|
||||
std::vector<cmCommand*>::iterator it;
|
||||
for ( it = commands.begin(); it != commands.end();
|
||||
++ it )
|
||||
|
@ -2274,8 +2273,6 @@ const char *cmake::GetProperty(const std::string& prop)
|
|||
const char *cmake::GetProperty(const std::string& prop,
|
||||
cmProperty::ScopeType scope)
|
||||
{
|
||||
bool chain = false;
|
||||
|
||||
// watch for special properties
|
||||
std::string output = "";
|
||||
if ( prop == "CACHE_VARIABLES" )
|
||||
|
@ -2333,7 +2330,8 @@ const char *cmake::GetProperty(const std::string& prop,
|
|||
return FOR_EACH_CXX_FEATURE(STRING_LIST_ELEMENT) + 1;
|
||||
}
|
||||
#undef STRING_LIST_ELEMENT
|
||||
return this->Properties.GetPropertyValue(prop, scope, chain);
|
||||
bool dummy = false;
|
||||
return this->Properties.GetPropertyValue(prop, scope, dummy);
|
||||
}
|
||||
|
||||
bool cmake::GetPropertyAsBool(const std::string& prop)
|
||||
|
|
|
@ -287,9 +287,6 @@ class cmake
|
|||
cmProperty::ScopeType scope);
|
||||
bool GetPropertyAsBool(const std::string& prop);
|
||||
|
||||
// Get the properties
|
||||
cmPropertyMap &GetProperties() { return this->Properties; }
|
||||
|
||||
///! Get or create an cmInstalledFile instance and return a pointer to it
|
||||
cmInstalledFile *GetOrCreateInstalledFile(
|
||||
cmMakefile* mf, const std::string& name);
|
||||
|
@ -383,7 +380,6 @@ protected:
|
|||
void InitializeProperties();
|
||||
int HandleDeleteCacheVariables(const std::string& var);
|
||||
cmPropertyMap Properties;
|
||||
std::set<std::pair<std::string,cmProperty::ScopeType> > AccessedProperties;
|
||||
|
||||
std::map<cmProperty::ScopeType, cmPropertyDefinitionMap>
|
||||
PropertyDefinitions;
|
||||
|
|
Loading…
Reference in New Issue