Browse Source

add version numbers in the project

Ioannis Koutras 13 years ago
parent
commit
826eb33856
2 changed files with 22 additions and 1 deletions
  1. 4 1
      CMakeLists.txt
  2. 18 0
      config.h.cmake

+ 4 - 1
CMakeLists.txt

@@ -4,6 +4,9 @@ cmake_minimum_required (VERSION 2.6)
 
 set(APPLICATION_NAME ${PROJECT_NAME})
 
+set(APPLICATION_VERSION_MAJOR 0)
+set(APPLICATION_VERSION_MINOR 5)
+
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
 
 include(DefineInstallationPaths)
@@ -134,7 +137,7 @@ if(WITH_DOC)
 endif (WITH_DOC)
 
 message(STATUS "********************************************")
-message(STATUS "********** ${PROJECT_NAME} build options : **********")
+message(STATUS "********** ${PROJECT_NAME} v${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR} build options : **********")
 message(STATUS "OS call for memory requests: " ${WITH_SYSTEM_CALLS})
 if(NOT WITH_SYSTEM_CALLS STREQUAL "none")
   message(STATUS "Default allocation size for OS calls: " ${SYS_ALLOC_SIZE} " bytes")

+ 18 - 0
config.h.cmake

@@ -28,6 +28,24 @@
 #ifndef DMM_CONFIG_H
 #define DMM_CONFIG_H
 
+/* Version Numbers */
+
+/**
+ * @brief The main version of dmmlib
+ *
+ * This version is checked at library initialization time. A major version match
+ * is required in order to properly setup the runtime communication, otherwise
+ * the library initilization shall fail.
+ */
+#define DMMLIB_VERSION_MAJOR @APPLICATION_VERSION_MAJOR@
+/**
+ * @brief The revision version of dmmlib
+ *
+ * The minor version is increased at each internal library update which does not
+ * cause any backward incompatibility.
+ */
+#define DMMLIB_VERSION_MINOR @APPLICATION_VERSION_MINOR@
+
 /* General Settings */
 
 /** Support for freelist-organized raw blocks */