summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-10 16:25:08 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-02-10 16:25:08 (GMT)
commitd7133c0288e82627569071c84dfaa94516deb9eb (patch)
tree33fe45167f6de87f7d6dad1f06ea44e856784620 /Source
parentc00d84cdf34808f66d83e78fac5b741d980d8796 (diff)
parenteaf703f16082fdd79983e32356aa20e64f94bd8b (diff)
downloadCMake-d7133c0288e82627569071c84dfaa94516deb9eb.zip
CMake-d7133c0288e82627569071c84dfaa94516deb9eb.tar.gz
CMake-d7133c0288e82627569071c84dfaa94516deb9eb.tar.bz2
Merge topic 'cmake-devel-version-macro'
eaf703f1 Export: Use a macro to ensure minimum development version requirement
Diffstat (limited to 'Source')
-rw-r--r--Source/cmExportInstallFileGenerator.cxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index 73e9b31..eb7cea9 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -19,6 +19,18 @@
#include "cmInstallExportGenerator.h"
#include "cmInstallTargetGenerator.h"
#include "cmTargetExport.h"
+#include "cmVersionConfig.h"
+
+#define STRINGIFY_HELPER(X) #X
+#define STRINGIFY(X) STRINGIFY_HELPER(X)
+
+#define DEVEL_CMAKE_VERSION(maj, min, patch) \
+ (maj > CMake_VERSION_MAJOR \
+ || min > CMake_VERSION_MINOR \
+ || patch > CMake_VERSION_PATCH) ? \
+ STRINGIFY(CMake_VERSION_MAJOR) "." STRINGIFY(CMake_VERSION_MINOR) "." \
+ STRINGIFY(CMake_VERSION_PATCH) "." STRINGIFY(CMake_VERSION_TWEAK) \
+ : #maj "." #min "." #patch
//----------------------------------------------------------------------------
cmExportInstallFileGenerator
@@ -176,7 +188,7 @@ bool cmExportInstallFileGenerator::GenerateMainFile(std::ostream& os)
if (require3_0_0)
{
- this->GenerateRequiredCMakeVersion(os, "2.8.12.20131007");
+ this->GenerateRequiredCMakeVersion(os, DEVEL_CMAKE_VERSION(3, 0, 0));
}
else if (require2_8_12)
{