[mlpack-git] master: Update version macros to retain underscore versions. (e0e9d04)

gitdub at mlpack.org gitdub at mlpack.org
Thu Apr 14 14:40:28 EDT 2016


Repository : https://github.com/mlpack/mlpack
On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/3781ccbe93bb4cb886978b4c865ff9b42f5dbc56...637809fec8d341829e4cd122cf5a385e5e219c9b

>---------------------------------------------------------------

commit e0e9d0463e3f645ca64fa7410e70aa90e8ffbd1a
Author: Ryan Curtin <ryan at ratml.org>
Date:   Thu Apr 14 14:40:28 2016 -0400

    Update version macros to retain underscore versions.


>---------------------------------------------------------------

e0e9d0463e3f645ca64fa7410e70aa90e8ffbd1a
 CMakeLists.txt                   | 2 +-
 src/mlpack/core/util/version.hpp | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19cb67f..d018fb9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -262,7 +262,7 @@ if (GIT_FOUND)
       OUTPUT_STRIP_TRAILING_WHITESPACE)
   if (${MLPACK_TMP_REV_INFO_RESULT} EQUAL 0)
     set (USING_GIT "YES")
-    add_definitions(-D__MLPACK_GIT_VERSION)
+    add_definitions(-DMLPACK_GIT_VERSION)
     include(CMake/CreateGitVersionHeader.cmake)
 
     add_custom_target(mlpack_gitversion ALL
diff --git a/src/mlpack/core/util/version.hpp b/src/mlpack/core/util/version.hpp
index 92e631f..f883f8d 100644
--- a/src/mlpack/core/util/version.hpp
+++ b/src/mlpack/core/util/version.hpp
@@ -15,6 +15,12 @@
 #define MLPACK_VERSION_MINOR 0
 #define MLPACK_VERSION_PATCH "x"
 
+// Reverse compatibility; these macros will be removed in future versions of
+// mlpack (3.0.0 and newer)!
+#define __MLPACK_VERSION_MAJOR 2
+#define __MLPACK_VERSION_MINOR 0
+#define __MLPACK_VERSION_PATCH "x"
+
 // The name of the version (for use by --version).
 namespace mlpack {
 namespace util {




More information about the mlpack-git mailing list