summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-06 13:19:34 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-06 13:19:34 (GMT)
commit9b7213dc47d2477cb4ceb5032a9078412b5474bd (patch)
treed0372265c5b1f07f9b1a8a6cc9bedf96bed2dbcb
parent0e6b00ee494f341be104fa2a00543fc4acd43c6f (diff)
parentc37cf7fa9e0aa7f7c3a2b32457385a1caf37bc3c (diff)
downloadCMake-9b7213dc47d2477cb4ceb5032a9078412b5474bd.zip
CMake-9b7213dc47d2477cb4ceb5032a9078412b5474bd.tar.gz
CMake-9b7213dc47d2477cb4ceb5032a9078412b5474bd.tar.bz2
Merge topic 'minor-cleanups'
c37cf7fa cmCacheManager: Remove unused method 64556e3d 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.
-rw-r--r--Source/cmCacheManager.cxx38
-rw-r--r--Source/cmCacheManager.h6
-rw-r--r--Source/cmGeneratorExpressionNode.cxx1
-rw-r--r--Source/cmGlobalGenerator.cxx3
-rw-r--r--Source/cmListFileCache.cxx6
-rw-r--r--Source/cmListFileCache.h5
-rw-r--r--Source/cmMakefile.cxx5
-rw-r--r--Source/cmMakefile.h12
-rw-r--r--Source/cmake.cxx8
-rw-r--r--Source/cmake.h4
10 files changed, 7 insertions, 81 deletions
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index 0c77891..fa7eff3 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -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));
-}
diff --git a/Source/cmCacheManager.h b/Source/cmCacheManager.h
index d9a9112..f7f8776 100644
--- a/Source/cmCacheManager.h
+++ b/Source/cmCacheManager.h
@@ -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
diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx
index 673dcb9..2654851 100644
--- a/Source/cmGeneratorExpressionNode.cxx
+++ b/Source/cmGeneratorExpressionNode.cxx
@@ -1554,7 +1554,6 @@ class ArtifactPdbTag;
class ArtifactPathTag;
class ArtifactDirTag;
-class ArtifactNameTag;
//----------------------------------------------------------------------------
template<typename ArtifactT>
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 8123c99..3c0a0e2 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -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();
diff --git a/Source/cmListFileCache.cxx b/Source/cmListFileCache.cxx
index 3e26349..ddcea9b 100644
--- a/Source/cmListFileCache.cxx
+++ b/Source/cmListFileCache.cxx
@@ -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)
{
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 2ca9b8e..544ff1b 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -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;
};
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ec1d814..215ee16 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -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);
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index ebfe508..920b6b7 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -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;
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 51df7f2..5c52a1a 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -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)
diff --git a/Source/cmake.h b/Source/cmake.h
index 60ffcd4..c22b329 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -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;