summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-07-08 03:20:30 (GMT)
committerBrad King <brad.king@kitware.com>2003-07-08 03:20:30 (GMT)
commited273acfa7884c0b9dddf480deec9a263f536c85 (patch)
tree2b460ff524f41e032d165ef75e92aaeb6323a9f1
parenteb7b7dc1046dbc9d60e12a16d2ae3242328f85c0 (diff)
downloadCMake-ed273acfa7884c0b9dddf480deec9a263f536c85.zip
CMake-ed273acfa7884c0b9dddf480deec9a263f536c85.tar.gz
CMake-ed273acfa7884c0b9dddf480deec9a263f536c85.tar.bz2
ENH: Improved name of cmake version variables. They are now CMake_VERSION (major.minor) and CMake_VERSION_FULL (major.minor.patch).
-rw-r--r--CMakeLists.txt4
-rw-r--r--Source/cmDocumentation.cxx6
-rw-r--r--Source/cmDumpDocumentation.cxx5
-rw-r--r--Source/cmStandardIncludes.h6
4 files changed, 14 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2391150..7655d66 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,8 +4,8 @@ PROJECT(CMake)
SET(CMake_VERSION_MAJOR 1)
SET(CMake_VERSION_MINOR 7)
SET(CMake_VERSION_PATCH 0)
-SET(CMake_VERSION_STRING
- "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH}")
+SET(CMake_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
+SET(CMake_VERSION_FULL "${CMake_VERSION}.${CMake_VERSION_PATCH}")
IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 390ab5b..21cde88 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -122,7 +122,7 @@ cmDocumentation::cmDocumentation()
//----------------------------------------------------------------------------
void cmDocumentation::PrintCopyright(std::ostream& os)
{
- os << "CMake version " CMake_VERSION_STRING "\n";
+ os << "CMake version " CMake_VERSION_FULL "\n";
for(const cmDocumentationEntry* op = cmDocumentationCopyright;
op->brief; ++op)
{
@@ -144,7 +144,7 @@ void cmDocumentation::PrintCopyright(std::ostream& os)
//----------------------------------------------------------------------------
void cmDocumentation::PrintVersion(std::ostream& os)
{
- os << "CMake version " CMake_VERSION_STRING "\n";
+ os << "CMake version " CMake_VERSION_FULL "\n";
}
//----------------------------------------------------------------------------
@@ -764,7 +764,7 @@ void cmDocumentation::PrintDocumentationMan(std::ostream& os)
this->CreateManDocumentation();
os << ".TH CMake 1 \""
<< cmSystemTools::GetCurrentDateTime("%B %d, %Y").c_str()
- << "\" \"CMake " CMake_VERSION_STRING "\"\n";
+ << "\" \"CMake " CMake_VERSION_FULL "\"\n";
this->Print(ManForm, os);
}
diff --git a/Source/cmDumpDocumentation.cxx b/Source/cmDumpDocumentation.cxx
index edee6d6..0b474c4 100644
--- a/Source/cmDumpDocumentation.cxx
+++ b/Source/cmDumpDocumentation.cxx
@@ -66,7 +66,7 @@ int DumpHTML(const char* outname)
cmDocumentation doc;
std::vector<cmDocumentationEntry> commands;
cmi.GetCommandDocumentation(commands);
- doc.AddSection("Documentation for Commands of CMake " CMake_VERSION_STRING,
+ doc.AddSection("Documentation for Commands of CMake " CMake_VERSION_FULL,
&commands[0]);
doc.Print(cmDocumentation::HTMLForm, fout);
@@ -78,12 +78,15 @@ int DumpForCoverage()
cmake cmi;
cmDocumentation doc;
std::vector<cmDocumentationEntry> commands;
+ std::vector<cmDocumentationEntry> generators;
cmi.GetCommandDocumentation(commands);
+ cmi.GetGeneratorDocumentation(generators);
doc.SetNameSection(cmDocumentationName);
doc.SetUsageSection(cmDocumentationUsage);
doc.SetDescriptionSection(cmDocumentationDescription);
doc.SetOptionsSection(cmDocumentationOptions);
doc.SetCommandsSection(&commands[0]);
+ doc.SetGeneratorsSection(&generators[0]);
doc.PrintDocumentation(cmDocumentation::Usage, std::cout);
doc.PrintDocumentation(cmDocumentation::Full, std::cout);
doc.PrintDocumentation(cmDocumentation::HTML, std::cout);
diff --git a/Source/cmStandardIncludes.h b/Source/cmStandardIncludes.h
index 0b3aef5..98211b6 100644
--- a/Source/cmStandardIncludes.h
+++ b/Source/cmStandardIncludes.h
@@ -28,7 +28,11 @@
// CMAKE_NO_STD_NAMESPACE, and other macros.
#include "cmConfigure.h"
-#define CMake_VERSION_STRING \
+#define CMake_VERSION \
+ CMAKE_TO_STRING(CMake_VERSION_MAJOR) "." \
+ CMAKE_TO_STRING(CMake_VERSION_MINOR)
+
+#define CMake_VERSION_FULL \
CMAKE_TO_STRING(CMake_VERSION_MAJOR) "." \
CMAKE_TO_STRING(CMake_VERSION_MINOR) "." \
CMAKE_TO_STRING(CMake_VERSION_PATCH)