[Cmake-commits] CMake branch, next, updated. v2.8.12.2-7583-gb687e9c
Brad King
brad.king at kitware.com
Mon Feb 10 15:14:55 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via b687e9c08c9125295645713b9201dab8f917f658 (commit)
via b831e889828adfae93f795837ebb80c6eed8d5c7 (commit)
via 9d36613f25f57323d4a51e797bf2b5b476003b7c (commit)
from e90fc2d1560d101b710749ecfbfb21bb73b35a19 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b687e9c08c9125295645713b9201dab8f917f658
commit b687e9c08c9125295645713b9201dab8f917f658
Merge: e90fc2d b831e889
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 10 15:14:54 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Feb 10 15:14:54 2014 -0500
Merge topic 'cmake-devel-version-macro' into next
b831e889 Export: Simplify internal CMake version test logic
9d36613f cmVersion: Fix CMake_VERSION_ENCODE for date in patch level
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b831e889828adfae93f795837ebb80c6eed8d5c7
commit b831e889828adfae93f795837ebb80c6eed8d5c7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 10 15:10:43 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 10 15:10:43 2014 -0500
Export: Simplify internal CMake version test logic
Use the CMake_VERSION_ENCODE macro to perform the version comparison
in the DEVEL_CMAKE_VERSION macro in one step.
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 73e7cee..56c0ec1 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -19,16 +19,16 @@
#include "cmInstallExportGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmTargetExport.h"
-#include "cmVersionConfig.h"
+#include "cmVersionMacros.h"
+#include "cmVersion.h"
#define STRINGIFY_HELPER(X) #X
#define STRINGIFY(X) STRINGIFY_HELPER(X)
#define DEVEL_CMAKE_VERSION(maj, min, patch) \
- (maj > CMake_VERSION_MAJOR \
- || (maj == CMake_VERSION_MAJOR && min > CMake_VERSION_MINOR) \
- || (maj == CMake_VERSION_MAJOR && min == CMake_VERSION_MINOR && \
- patch > CMake_VERSION_PATCH) \
+ (CMake_VERSION_ENCODE(maj, min, patch) > \
+ CMake_VERSION_ENCODE(CMake_VERSION_MAJOR, CMake_VERSION_MINOR, \
+ CMake_VERSION_PATCH) \
) ? \
STRINGIFY(CMake_VERSION_MAJOR) "." STRINGIFY(CMake_VERSION_MINOR) "." \
STRINGIFY(CMake_VERSION_PATCH) "." STRINGIFY(CMake_VERSION_TWEAK) \
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9d36613f25f57323d4a51e797bf2b5b476003b7c
commit 9d36613f25f57323d4a51e797bf2b5b476003b7c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Feb 10 14:52:59 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Feb 10 15:06:50 2014 -0500
cmVersion: Fix CMake_VERSION_ENCODE for date in patch level
Use a uint64_t to store encoded version numbers so we have plenty of
bits available. Encode with room for up to 1000 minor releases between
major releases and to encode dates until the year 10000 in the patch
level. This is necessary because CMake development versions prior to
release 2.8.0 used the date in the patch level, and this practice may be
restored after the 3.0 release.
diff --git a/Source/cmCacheManager.cxx b/Source/cmCacheManager.cxx
index d3d8f3f..9e0064e 100644
--- a/Source/cmCacheManager.cxx
+++ b/Source/cmCacheManager.cxx
@@ -930,7 +930,7 @@ bool cmCacheManager::NeedCacheCompatibility(int major, int minor)
// Compatibility is needed if the cache version is equal to or lower
// than the given version.
- unsigned int actual_compat =
+ 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/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index 7ceebb2..0d80e48 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -114,7 +114,7 @@ private:
unsigned int VersionFoundPatch;
unsigned int VersionFoundTweak;
unsigned int VersionFoundCount;
- unsigned int RequiredCMakeVersion;
+ cmIML_INT_uint64_t RequiredCMakeVersion;
bool Quiet;
bool Required;
bool UseConfigFiles;
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index a2a66ae..b8b7035 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -3345,7 +3345,7 @@ cmLocalGenerator::GetTargetDirectory(cmTarget const&) const
}
//----------------------------------------------------------------------------
-unsigned int cmLocalGenerator::GetBackwardsCompatibility()
+cmIML_INT_uint64_t cmLocalGenerator::GetBackwardsCompatibility()
{
// The computed version may change until the project is fully
// configured.
@@ -3398,7 +3398,7 @@ bool cmLocalGenerator::NeedBackwardsCompatibility_2_4()
// Compatibility is needed if CMAKE_BACKWARDS_COMPATIBILITY is set
// equal to or lower than the given version.
- unsigned int actual_compat = this->GetBackwardsCompatibility();
+ cmIML_INT_uint64_t actual_compat = this->GetBackwardsCompatibility();
return (actual_compat &&
actual_compat <= CMake_VERSION_ENCODE(2, 4, 255));
}
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index ad662d5..9764813 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -321,7 +321,7 @@ public:
*
* and is monotonically increasing with the CMake version.
*/
- unsigned int GetBackwardsCompatibility();
+ cmIML_INT_uint64_t GetBackwardsCompatibility();
/**
* Test whether compatibility is set to a given version or lower.
@@ -460,7 +460,7 @@ protected:
bool RelativePathsConfigured;
bool PathConversionsSetup;
- unsigned int BackwardsCompatibility;
+ cmIML_INT_uint64_t BackwardsCompatibility;
bool BackwardsCompatibilityFinal;
private:
std::string ConvertToOutputForExistingCommon(const char* remote,
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index ebfa8f9..b4ae657 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -40,6 +40,9 @@
#pragma warning ( disable : 1572 ) /* floating-point equality test */
#endif
+// Provide fixed-size integer types.
+#include <cmIML/INT.h>
+
#include <stdarg.h> // Work-around for SGI MIPSpro 7.4.2m header bug
// This is a hack to prevent warnings about these functions being
diff --git a/Source/cmVersion.h b/Source/cmVersion.h
index e313524..0ab6390 100644
--- a/Source/cmVersion.h
+++ b/Source/cmVersion.h
@@ -32,8 +32,13 @@ public:
static const char* GetCMakeVersion();
};
+/* Encode with room for up to 1000 minor releases between major releases
+ and to encode dates until the year 10000 in the patch level. */
+#define CMake_VERSION_ENCODE__BASE cmIML_INT_UINT64_C(100000000)
#define CMake_VERSION_ENCODE(major, minor, patch) \
- ((major)*0x10000u + (minor)*0x100u + (patch))
+ ((((major) * 1000u) * CMake_VERSION_ENCODE__BASE) + \
+ (((minor) % 1000u) * CMake_VERSION_ENCODE__BASE) + \
+ (((patch) % CMake_VERSION_ENCODE__BASE)))
#endif
-----------------------------------------------------------------------
Summary of changes:
Source/cmCacheManager.cxx | 2 +-
Source/cmExportInstallFileGenerator.cxx | 10 +++++-----
Source/cmFindPackageCommand.h | 2 +-
Source/cmLocalGenerator.cxx | 4 ++--
Source/cmLocalGenerator.h | 4 ++--
Source/cmStandardIncludes.h | 3 +++
Source/cmVersion.h | 7 ++++++-
7 files changed, 20 insertions(+), 12 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list