summaryrefslogtreecommitdiff
path: root/Source/cmExportFileGenerator.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-02-11 16:31:53 +0100
committerStephen Kelly <steveire@gmail.com>2014-02-11 16:31:53 +0100
commit6ca6613ab8a30da726118b31e1c6fb11c54e6cdd (patch)
tree930513fcbd0757c18c7942f376cce9a81bb8340f /Source/cmExportFileGenerator.h
parent9bcc1b21f05a8f522c5154e163942c6d133bb379 (diff)
downloadcmake-6ca6613ab8a30da726118b31e1c6fb11c54e6cdd.tar.gz
Export: Use the CMAKE_DEVEL_VERSION macro for build-export files.
Move the macro definition to the cmExportBuildFileGenerator.h header to share it.
Diffstat (limited to 'Source/cmExportFileGenerator.h')
-rw-r--r--Source/cmExportFileGenerator.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.h b/Source/cmExportFileGenerator.h
index 1438f4d06a..8be4bbf8b7 100644
--- a/Source/cmExportFileGenerator.h
+++ b/Source/cmExportFileGenerator.h
@@ -15,6 +15,21 @@
#include "cmCommand.h"
#include "cmGeneratorExpression.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) \
+ (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) \
+ : #maj "." #min "." #patch
+
class cmTargetExport;
/** \class cmExportFileGenerator