diff --git a/CMakeLists.txt b/CMakeLists.txt index 19cb67f368..d018fb9f38 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 92e631f15c..f883f8d8fe 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 {