diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-11-29 20:59:16 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-11-29 20:59:16 (GMT) |
commit | ccb77b65c673037780483e23c7bc1b4bf1d17cbc (patch) | |
tree | 0cd149a96082da683a29bb31a6bfc0f60555e0d5 /Source/cmake.cxx | |
parent | 46f8ed064820ec7a9d645a55a1ad7a0d3d7b8134 (diff) | |
download | CMake-ccb77b65c673037780483e23c7bc1b4bf1d17cbc.zip CMake-ccb77b65c673037780483e23c7bc1b4bf1d17cbc.tar.gz CMake-ccb77b65c673037780483e23c7bc1b4bf1d17cbc.tar.bz2 |
ENH: unify version stuff, get rid of it out of cmake and cmMakefile and only use cmVersion
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index af6fdc9..910ce87 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1487,8 +1487,8 @@ int cmake::Configure() if(!this->CacheManager->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")) { char ver[256]; - sprintf(ver,"%i.%i",cmMakefile::GetMajorVersion(), - cmMakefile::GetMinorVersion()); + sprintf(ver,"%i.%i",cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion()); this->CacheManager->AddCacheEntry ("CMAKE_BACKWARDS_COMPATIBILITY",ver, "For backwards compatibility, what version of CMake commands and " @@ -1680,10 +1680,10 @@ bool cmake::CacheVersionMatches() this->CacheManager->GetCacheValue("CMAKE_CACHE_RELEASE_VERSION"); bool cacheSameCMake = false; if(majv && - atoi(majv) == static_cast<int>(cmMakefile::GetMajorVersion()) + atoi(majv) == static_cast<int>(cmVersion::GetMajorVersion()) && minv && - atoi(minv) == static_cast<int>(cmMakefile::GetMinorVersion()) - && relv && (strcmp(relv, cmMakefile::GetReleaseVersion()) == 0)) + atoi(minv) == static_cast<int>(cmVersion::GetMinorVersion()) + && relv && (strcmp(relv, cmVersion::GetReleaseVersion().c_str()) == 0)) { cacheSameCMake = true; } @@ -1815,21 +1815,6 @@ int cmake::Generate() return 0; } -unsigned int cmake::GetMajorVersion() -{ - return cmMakefile::GetMajorVersion(); -} - -unsigned int cmake::GetMinorVersion() -{ - return cmMakefile::GetMinorVersion(); -} - -const char *cmake::GetReleaseVersion() -{ - return cmMakefile::GetReleaseVersion(); -} - void cmake::AddCacheEntry(const char* key, const char* value, const char* helpString, int type) @@ -1852,8 +1837,9 @@ int cmake::DumpDocumentationToFile(std::ostream& f) const char *terse; const char *full; char tmp[1024]; - sprintf(tmp,"Version %d.%d (%s)", cmake::GetMajorVersion(), - cmake::GetMinorVersion(), cmVersion::GetReleaseVersion().c_str()); + sprintf(tmp,"Version %d.%d (%s)", cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion(), + cmVersion::GetReleaseVersion().c_str()); f << "<html>\n"; f << "<h1>Documentation for commands of CMake " << tmp << "</h1>\n"; f << "<ul>\n"; @@ -1959,8 +1945,8 @@ int cmake::LoadCache() if(!this->CacheManager->GetCacheValue("CMAKE_BACKWARDS_COMPATIBILITY")) { char ver[256]; - sprintf(ver,"%i.%i",cmMakefile::GetMajorVersion(), - cmMakefile::GetMinorVersion()); + sprintf(ver,"%i.%i",cmVersion::GetMajorVersion(), + cmVersion::GetMinorVersion()); this->CacheManager->AddCacheEntry ("CMAKE_BACKWARDS_COMPATIBILITY",ver, "For backwards compatibility, what version of CMake commands and " |