[Cmake-commits] CMake branch, next, updated. v3.6.0-852-gbe52df6

Brad King brad.king at kitware.com
Thu Jul 14 10:37:27 EDT 2016


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  be52df6ff5e8d66014d0ad8904702169b8b1bb5e (commit)
       via  4db08807db2fc0db6ab0c4d438ddb3f20969d2fb (commit)
       via  43a68a6dcaa7a98d94a71b4f2ecc2e2c63c84688 (commit)
       via  af0e1cd4cbb7029de0877de9db72ba37085abff2 (commit)
       via  6a077b5d63895489c2962af2f7302f52444045cc (commit)
      from  89c5939e56eb4f13a09cace84dc1347e8e93c917 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be52df6ff5e8d66014d0ad8904702169b8b1bb5e
commit be52df6ff5e8d66014d0ad8904702169b8b1bb5e
Merge: 89c5939 4db0880
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 14 10:37:25 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Jul 14 10:37:25 2016 -0400

    Merge topic 'cmake-internal-info' into next
    
    4db08807 CMake: Report whether generators support platforms
    43a68a6d cmGlobalGeneratorFactory: Use CM_OVERRIDE for all derived classes
    af0e1cd4 Make CMake version dirty state available to code
    6a077b5d Make CMake version suffix available to code


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4db08807db2fc0db6ab0c4d438ddb3f20969d2fb
commit 4db08807db2fc0db6ab0c4d438ddb3f20969d2fb
Author:     Tobias Hunger <tobias.hunger at qt.io>
AuthorDate: Mon Jul 11 15:44:37 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jul 14 10:35:58 2016 -0400

    CMake: Report whether generators support platforms

diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h
index 6787519..74d3145 100644
--- a/Source/cmGlobalGeneratorFactory.h
+++ b/Source/cmGlobalGeneratorFactory.h
@@ -41,6 +41,9 @@ public:
 
   /** Determine whether or not this generator supports toolsets */
   virtual bool SupportsToolset() const = 0;
+
+  /** Determine whether or not this generator supports platforms */
+  virtual bool SupportsPlatform() const = 0;
 };
 
 template <class T>
@@ -71,6 +74,9 @@ public:
 
   /** Determine whether or not this generator supports toolsets */
   bool SupportsToolset() const CM_OVERRIDE { return T::SupportsToolset(); }
+
+  /** Determine whether or not this generator supports platforms */
+  bool SupportsPlatform() const CM_OVERRIDE { return T::SupportsPlatform(); }
 };
 
 #endif
diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h
index 473d153..b2aac45 100644
--- a/Source/cmGlobalGhsMultiGenerator.h
+++ b/Source/cmGlobalGhsMultiGenerator.h
@@ -52,6 +52,12 @@ public:
   static bool SupportsToolset() { return false; }
 
   /**
+   * Utilized by the generator factory to determine if this generator
+   * supports platforms.
+   */
+  static bool SupportsPlatform() { return false; }
+
+  /**
   * Try to determine system information such as shared library
   * extension, pthreads, byte order etc.
   */
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 69ec6ca..c74973e 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -81,6 +81,12 @@ public:
   static bool SupportsToolset() { return false; }
 
   /**
+   * Utilized by the generator factory to determine if this generator
+   * supports platforms.
+   */
+  static bool SupportsPlatform() { return false; }
+
+  /**
    * Write a build statement to @a os with the @a comment using
    * the @a rule the list of @a outputs files and inputs.
    * It also writes the variables bound to this build statement.
diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h
index 98969ff..ceb4140 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.h
+++ b/Source/cmGlobalUnixMakefileGenerator3.h
@@ -75,6 +75,12 @@ public:
    */
   static bool SupportsToolset() { return false; }
 
+  /**
+   * Utilized by the generator factory to determine if this generator
+   * supports platforms.
+   */
+  static bool SupportsPlatform() { return false; }
+
   /** Get the documentation entry for this generator.  */
   static void GetDocumentation(cmDocumentationEntry& entry);
 
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 2379266..c13c622 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -80,6 +80,7 @@ public:
   }
 
   bool SupportsToolset() const CM_OVERRIDE { return true; }
+  bool SupportsPlatform() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index 106f1dd..1478a17 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -92,6 +92,7 @@ public:
   }
 
   bool SupportsToolset() const CM_OVERRIDE { return true; }
+  bool SupportsPlatform() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index 2b32153..3047171 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -74,6 +74,7 @@ public:
   }
 
   bool SupportsToolset() const CM_OVERRIDE { return true; }
+  bool SupportsPlatform() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index 920d995..254682c 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -74,6 +74,7 @@ public:
   }
 
   bool SupportsToolset() const CM_OVERRIDE { return true; }
+  bool SupportsPlatform() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h
index 2092343..8a33ee0 100644
--- a/Source/cmGlobalVisualStudio7Generator.h
+++ b/Source/cmGlobalVisualStudio7Generator.h
@@ -48,6 +48,12 @@ public:
   static bool SupportsToolset() { return false; }
 
   /**
+   * Utilized by the generator factory to determine if this generator
+   * supports platforms.
+   */
+  static bool SupportsPlatform() { return false; }
+
+  /**
    * Try to determine system information such as shared library
    * extension, pthreads, byte order etc.
    */
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index 3cade96..2c0168e 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -83,6 +83,7 @@ public:
   }
 
   bool SupportsToolset() const CM_OVERRIDE { return false; }
+  bool SupportsPlatform() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index b65a5a9..acc7baa 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -86,6 +86,7 @@ public:
   }
 
   bool SupportsToolset() const CM_OVERRIDE { return false; }
+  bool SupportsPlatform() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory()
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7b085d0..23fad51 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -122,6 +122,7 @@ public:
   }
 
   bool SupportsToolset() const CM_OVERRIDE { return true; }
+  bool SupportsPlatform() const CM_OVERRIDE { return false; }
 };
 
 cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm,
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index c597605..fceec16 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -853,6 +853,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators)
     for (size_t j = 0; j < names.size(); ++j) {
       GeneratorInfo info;
       info.supportsToolset = (*i)->SupportsToolset();
+      info.supportsPlatform = (*i)->SupportsPlatform();
       info.name = names[j];
       generators.push_back(info);
     }
@@ -865,6 +866,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators)
     GeneratorInfo info;
     info.name = i->first;
     info.supportsToolset = false;
+    info.supportsPlatform = false;
     generators.push_back(info);
   }
 }
diff --git a/Source/cmake.h b/Source/cmake.h
index 4a5376d..4ca2a80 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -104,6 +104,7 @@ public:
   {
     std::string name;
     bool supportsToolset;
+    bool supportsPlatform;
   };
 
   typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=43a68a6dcaa7a98d94a71b4f2ecc2e2c63c84688
commit 43a68a6dcaa7a98d94a71b4f2ecc2e2c63c84688
Author:     Tobias Hunger <tobias.hunger at qt.io>
AuthorDate: Fri Jul 1 10:11:17 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jul 14 10:35:58 2016 -0400

    cmGlobalGeneratorFactory: Use CM_OVERRIDE for all derived classes

diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 90ff98b..2379266 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -42,8 +42,8 @@ class cmGlobalVisualStudio10Generator::Factory
   : public cmGlobalGeneratorFactory
 {
 public:
-  virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
-                                                   cmake* cm) const
+  cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+                                           cmake* cm) const CM_OVERRIDE
   {
     std::string genName;
     const char* p = cmVS10GenName(name, genName);
@@ -65,21 +65,21 @@ public:
     return 0;
   }
 
-  virtual void GetDocumentation(cmDocumentationEntry& entry) const
+  void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     entry.Name = std::string(vs10generatorName) + " [arch]";
     entry.Brief = "Generates Visual Studio 2010 project files.  "
                   "Optional [arch] can be \"Win64\" or \"IA64\".";
   }
 
-  virtual void GetGenerators(std::vector<std::string>& names) const
+  void GetGenerators(std::vector<std::string>& names) const CM_OVERRIDE
   {
     names.push_back(vs10generatorName);
     names.push_back(vs10generatorName + std::string(" IA64"));
     names.push_back(vs10generatorName + std::string(" Win64"));
   }
 
-  virtual bool SupportsToolset() const { return true; }
+  bool SupportsToolset() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index 295b6eb..106f1dd 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -36,8 +36,8 @@ class cmGlobalVisualStudio11Generator::Factory
   : public cmGlobalGeneratorFactory
 {
 public:
-  virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
-                                                   cmake* cm) const
+  cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+                                           cmake* cm) const CM_OVERRIDE
   {
     std::string genName;
     const char* p = cmVS11GenName(name, genName);
@@ -70,14 +70,14 @@ public:
     return ret;
   }
 
-  virtual void GetDocumentation(cmDocumentationEntry& entry) const
+  void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     entry.Name = std::string(vs11generatorName) + " [arch]";
     entry.Brief = "Generates Visual Studio 2012 project files.  "
                   "Optional [arch] can be \"Win64\" or \"ARM\".";
   }
 
-  virtual void GetGenerators(std::vector<std::string>& names) const
+  void GetGenerators(std::vector<std::string>& names) const CM_OVERRIDE
   {
     names.push_back(vs11generatorName);
     names.push_back(vs11generatorName + std::string(" ARM"));
@@ -91,7 +91,7 @@ public:
     }
   }
 
-  virtual bool SupportsToolset() const { return true; }
+  bool SupportsToolset() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx
index 318cb39..2b32153 100644
--- a/Source/cmGlobalVisualStudio12Generator.cxx
+++ b/Source/cmGlobalVisualStudio12Generator.cxx
@@ -36,8 +36,8 @@ class cmGlobalVisualStudio12Generator::Factory
   : public cmGlobalGeneratorFactory
 {
 public:
-  virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
-                                                   cmake* cm) const
+  cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+                                           cmake* cm) const CM_OVERRIDE
   {
     std::string genName;
     const char* p = cmVS12GenName(name, genName);
@@ -59,21 +59,21 @@ public:
     return 0;
   }
 
-  virtual void GetDocumentation(cmDocumentationEntry& entry) const
+  void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     entry.Name = std::string(vs12generatorName) + " [arch]";
     entry.Brief = "Generates Visual Studio 2013 project files.  "
                   "Optional [arch] can be \"Win64\" or \"ARM\".";
   }
 
-  virtual void GetGenerators(std::vector<std::string>& names) const
+  void GetGenerators(std::vector<std::string>& names) const CM_OVERRIDE
   {
     names.push_back(vs12generatorName);
     names.push_back(vs12generatorName + std::string(" ARM"));
     names.push_back(vs12generatorName + std::string(" Win64"));
   }
 
-  virtual bool SupportsToolset() const { return true; }
+  bool SupportsToolset() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index e190e84..920d995 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -36,8 +36,8 @@ class cmGlobalVisualStudio14Generator::Factory
   : public cmGlobalGeneratorFactory
 {
 public:
-  virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
-                                                   cmake* cm) const
+  cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+                                           cmake* cm) const CM_OVERRIDE
   {
     std::string genName;
     const char* p = cmVS14GenName(name, genName);
@@ -59,21 +59,21 @@ public:
     return 0;
   }
 
-  virtual void GetDocumentation(cmDocumentationEntry& entry) const
+  void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     entry.Name = std::string(vs14generatorName) + " [arch]";
     entry.Brief = "Generates Visual Studio 2015 project files.  "
                   "Optional [arch] can be \"Win64\" or \"ARM\".";
   }
 
-  virtual void GetGenerators(std::vector<std::string>& names) const
+  void GetGenerators(std::vector<std::string>& names) const CM_OVERRIDE
   {
     names.push_back(vs14generatorName);
     names.push_back(vs14generatorName + std::string(" ARM"));
     names.push_back(vs14generatorName + std::string(" Win64"));
   }
 
-  virtual bool SupportsToolset() const { return true; }
+  bool SupportsToolset() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index dfe196a..3cade96 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -25,8 +25,8 @@ static const char vs8generatorName[] = "Visual Studio 8 2005";
 class cmGlobalVisualStudio8Generator::Factory : public cmGlobalGeneratorFactory
 {
 public:
-  virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
-                                                   cmake* cm) const
+  cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+                                           cmake* cm) const CM_OVERRIDE
   {
     if (strncmp(name.c_str(), vs8generatorName,
                 sizeof(vs8generatorName) - 1) != 0) {
@@ -60,14 +60,14 @@ public:
     return ret;
   }
 
-  virtual void GetDocumentation(cmDocumentationEntry& entry) const
+  void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     entry.Name = std::string(vs8generatorName) + " [arch]";
     entry.Brief = "Generates Visual Studio 2005 project files.  "
                   "Optional [arch] can be \"Win64\".";
   }
 
-  virtual void GetGenerators(std::vector<std::string>& names) const
+  void GetGenerators(std::vector<std::string>& names) const CM_OVERRIDE
   {
     names.push_back(vs8generatorName);
     names.push_back(vs8generatorName + std::string(" Win64"));
@@ -82,7 +82,7 @@ public:
     }
   }
 
-  virtual bool SupportsToolset() const { return false; }
+  bool SupportsToolset() const CM_OVERRIDE { return false; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory()
diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx
index a47f4fc..b65a5a9 100644
--- a/Source/cmGlobalVisualStudio9Generator.cxx
+++ b/Source/cmGlobalVisualStudio9Generator.cxx
@@ -23,8 +23,8 @@ static const char vs9generatorName[] = "Visual Studio 9 2008";
 class cmGlobalVisualStudio9Generator::Factory : public cmGlobalGeneratorFactory
 {
 public:
-  virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
-                                                   cmake* cm) const
+  cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+                                           cmake* cm) const CM_OVERRIDE
   {
     if (strncmp(name.c_str(), vs9generatorName,
                 sizeof(vs9generatorName) - 1) != 0) {
@@ -62,14 +62,14 @@ public:
     return ret;
   }
 
-  virtual void GetDocumentation(cmDocumentationEntry& entry) const
+  void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     entry.Name = std::string(vs9generatorName) + " [arch]";
     entry.Brief = "Generates Visual Studio 2008 project files.  "
                   "Optional [arch] can be \"Win64\" or \"IA64\".";
   }
 
-  virtual void GetGenerators(std::vector<std::string>& names) const
+  void GetGenerators(std::vector<std::string>& names) const CM_OVERRIDE
   {
     names.push_back(vs9generatorName);
     names.push_back(vs9generatorName + std::string(" Win64"));
@@ -85,7 +85,7 @@ public:
     }
   }
 
-  virtual bool SupportsToolset() const { return false; }
+  bool SupportsToolset() const CM_OVERRIDE { return false; }
 };
 
 cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory()
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index e65ca09..7b085d0 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -108,20 +108,20 @@ public:
 class cmGlobalXCodeGenerator::Factory : public cmGlobalGeneratorFactory
 {
 public:
-  virtual cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
-                                                   cmake* cm) const;
+  cmGlobalGenerator* CreateGlobalGenerator(const std::string& name,
+                                           cmake* cm) const CM_OVERRIDE;
 
-  virtual void GetDocumentation(cmDocumentationEntry& entry) const
+  void GetDocumentation(cmDocumentationEntry& entry) const CM_OVERRIDE
   {
     cmGlobalXCodeGenerator::GetDocumentation(entry);
   }
 
-  virtual void GetGenerators(std::vector<std::string>& names) const
+  void GetGenerators(std::vector<std::string>& names) const CM_OVERRIDE
   {
     names.push_back(cmGlobalXCodeGenerator::GetActualName());
   }
 
-  virtual bool SupportsToolset() const { return true; }
+  bool SupportsToolset() const CM_OVERRIDE { return true; }
 };
 
 cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm,

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=af0e1cd4cbb7029de0877de9db72ba37085abff2
commit af0e1cd4cbb7029de0877de9db72ba37085abff2
Author:     Tobias Hunger <tobias.hunger at gmail.com>
AuthorDate: Fri Jul 8 11:40:16 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jul 14 10:35:58 2016 -0400

    Make CMake version dirty state available to code
    
    Set `CMake_VERSION_IS_DIRTY` to 1 or 0 depending on whether the CMake
    source tree is considered dirty or not.

diff --git a/Source/CMakeVersionCompute.cmake b/Source/CMakeVersionCompute.cmake
index 806e987..3bdcfd6 100644
--- a/Source/CMakeVersionCompute.cmake
+++ b/Source/CMakeVersionCompute.cmake
@@ -3,6 +3,7 @@ include(${CMake_SOURCE_DIR}/Source/CMakeVersion.cmake)
 
 # Releases define a small patch level.
 if("${CMake_VERSION_PATCH}" VERSION_LESS 20000000)
+  set(CMake_VERSION_IS_DIRTY 0)
   set(CMake_VERSION_IS_RELEASE 1)
   set(CMake_VERSION_SOURCE "")
 else()
@@ -22,3 +23,6 @@ endif()
 if(CMake_VERSION_SUFFIX)
   set(CMake_VERSION ${CMake_VERSION}-${CMake_VERSION_SUFFIX})
 endif()
+if(CMake_VERSION_IS_DIRTY)
+  set(CMake_VERSION ${CMake_VERSION}-dirty)
+endif()
diff --git a/Source/CMakeVersionSource.cmake b/Source/CMakeVersionSource.cmake
index 888f557..bc5975e 100644
--- a/Source/CMakeVersionSource.cmake
+++ b/Source/CMakeVersionSource.cmake
@@ -23,7 +23,9 @@ if(EXISTS ${CMake_SOURCE_DIR}/.git/HEAD)
         WORKING_DIRECTORY ${CMake_SOURCE_DIR}
         )
       if(dirty)
-        set(CMake_VERSION_SOURCE "${CMake_VERSION_SOURCE}-dirty")
+        set(CMake_VERSION_IS_DIRTY 1)
+      else()
+        set(CMake_VERSION_IS_DIRTY 0)
       endif()
     endif()
   endif()
diff --git a/Source/cmVersionConfig.h.in b/Source/cmVersionConfig.h.in
index af5c57b..92abfbe 100644
--- a/Source/cmVersionConfig.h.in
+++ b/Source/cmVersionConfig.h.in
@@ -13,4 +13,5 @@
 #define CMake_VERSION_MINOR @CMake_VERSION_MINOR@
 #define CMake_VERSION_PATCH @CMake_VERSION_PATCH@
 #define CMake_VERSION_SUFFIX "@CMake_VERSION_SUFFIX@"
+#define CMake_VERSION_IS_DIRTY @CMake_VERSION_IS_DIRTY@
 #define CMake_VERSION "@CMake_VERSION@"

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a077b5d63895489c2962af2f7302f52444045cc
commit 6a077b5d63895489c2962af2f7302f52444045cc
Author:     Tobias Hunger <tobias.hunger at qt.io>
AuthorDate: Fri Jul 1 09:40:09 2016 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Jul 14 10:27:17 2016 -0400

    Make CMake version suffix available to code
    
    Make the string (e.g. "rc1" or "gSHA-dirty") available to the code.

diff --git a/Source/CMakeVersionCompute.cmake b/Source/CMakeVersionCompute.cmake
index 496d6cf..806e987 100644
--- a/Source/CMakeVersionCompute.cmake
+++ b/Source/CMakeVersionCompute.cmake
@@ -12,9 +12,13 @@ endif()
 
 # Compute the full version string.
 set(CMake_VERSION ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}.${CMake_VERSION_PATCH})
-if(CMake_VERSION_RC)
-  set(CMake_VERSION ${CMake_VERSION}-rc${CMake_VERSION_RC})
-endif()
 if(CMake_VERSION_SOURCE)
-  set(CMake_VERSION ${CMake_VERSION}-${CMake_VERSION_SOURCE})
+  set(CMake_VERSION_SUFFIX "${CMake_VERSION_SOURCE}")
+elseif(CMake_VERSION_RC)
+  set(CMake_VERSION_SUFFIX "rc${CMake_VERSION_RC}")
+else()
+  set(CMake_VERSION_SUFFIX "")
+endif()
+if(CMake_VERSION_SUFFIX)
+  set(CMake_VERSION ${CMake_VERSION}-${CMake_VERSION_SUFFIX})
 endif()
diff --git a/Source/cmVersionConfig.h.in b/Source/cmVersionConfig.h.in
index 16aeabe..af5c57b 100644
--- a/Source/cmVersionConfig.h.in
+++ b/Source/cmVersionConfig.h.in
@@ -12,4 +12,5 @@
 #define CMake_VERSION_MAJOR @CMake_VERSION_MAJOR@
 #define CMake_VERSION_MINOR @CMake_VERSION_MINOR@
 #define CMake_VERSION_PATCH @CMake_VERSION_PATCH@
+#define CMake_VERSION_SUFFIX "@CMake_VERSION_SUFFIX@"
 #define CMake_VERSION "@CMake_VERSION@"

-----------------------------------------------------------------------

Summary of changes:
 Source/CMakeVersionCompute.cmake           |   16 ++++++++++++----
 Source/CMakeVersionSource.cmake            |    4 +++-
 Source/cmGlobalGeneratorFactory.h          |    6 ++++++
 Source/cmGlobalGhsMultiGenerator.h         |    6 ++++++
 Source/cmGlobalNinjaGenerator.h            |    6 ++++++
 Source/cmGlobalUnixMakefileGenerator3.h    |    6 ++++++
 Source/cmGlobalVisualStudio10Generator.cxx |   11 ++++++-----
 Source/cmGlobalVisualStudio11Generator.cxx |   11 ++++++-----
 Source/cmGlobalVisualStudio12Generator.cxx |   11 ++++++-----
 Source/cmGlobalVisualStudio14Generator.cxx |   11 ++++++-----
 Source/cmGlobalVisualStudio7Generator.h    |    6 ++++++
 Source/cmGlobalVisualStudio8Generator.cxx  |   11 ++++++-----
 Source/cmGlobalVisualStudio9Generator.cxx  |   11 ++++++-----
 Source/cmGlobalXCodeGenerator.cxx          |   11 ++++++-----
 Source/cmVersionConfig.h.in                |    2 ++
 Source/cmake.cxx                           |    2 ++
 Source/cmake.h                             |    1 +
 17 files changed, 92 insertions(+), 40 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list