]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
bos #26458 Versioning of sources via git commit id (sha1)
authorvsr <vsr@opencascade.com>
Sun, 3 Oct 2021 08:20:15 +0000 (11:20 +0300)
committervsr <vsr@opencascade.com>
Mon, 4 Oct 2021 09:57:53 +0000 (12:57 +0300)
CMakeLists.txt
bin/VERSION.in
src/GEOM_PY/CMakeLists.txt
src/GEOM_PY/__init__.py

index 1e1171b4df09f7c4b429212c2fbc32bdec5b71f7..c92530fca2c7a6e570d7557103a7bf3b0bd78e71 100644 (file)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
 INCLUDE(CMakeDependentOption)
 
+# Project name
+# ============
+# original
 PROJECT(SalomeGEOM C CXX)
-
-# Versioning
-# ===========
-# Project name, upper case
+# upper case
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
-SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
-SET(${PROJECT_NAME_UC}_VERSION
-  ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
-
 # Common CMake macros
 # ===================
 SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files")
@@ -43,6 +36,11 @@ ELSE()
   MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
 ENDIF()
 
+# Versioning
+# ===========
+SALOME_SETUP_VERSION(9.7.0 DEVELOPMENT)
+MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"")
+
 # Find KERNEL
 # ===========
 SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL")
@@ -216,7 +214,6 @@ ENDIF()
 
 # Header configuration
 # ====================
-SALOME_XVERSION(${PROJECT_NAME})
 SALOME_CONFIGURE_FILE(GEOM_version.h.in GEOM_version.h INSTALL ${SALOME_INSTALL_HEADERS})
 
 # Configuration export
index 2fc977aac151fb9e62cd2ac6a65091c416efef3c..d407341a470f1fddc3f4c7d1145bf335f88d3530 100644 (file)
@@ -1,3 +1,4 @@
 [SALOME GEOM] : @SALOMEGEOM_VERSION@
 [DEVELOPMENT] : @SALOMEGEOM_VERSION_DEV@
 [DESCRIPTION] : SALOME Geometry module
+[SHA1]        : @SALOMEGEOM_GIT_SHA1@
index 1844a9523f9798794878ed6baa891bb4ad031151..5d89549324babc96f4479bab654cfe77d2976f06 100644 (file)
@@ -22,7 +22,6 @@ ADD_SUBDIRECTORY( structelem )
 # scripts / python
 
 SET(_python_SCRIPTS
-  __init__.py
   geomtools.py
   sketcher.py
   )
@@ -30,3 +29,4 @@ SET(_python_SCRIPTS
 # --- rules ---
 
 SALOME_INSTALL_SCRIPTS("${_python_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/geom)
+SALOME_CONFIGURE_FILE(__init__.py __init__.py INSTALL ${SALOME_INSTALL_PYTHON}/salome/geom)
index 9b556047a5a745ab460f345f749fbbf9593b65a9..04fff6f5001ff3c03c02c58be006e55de610881a 100644 (file)
@@ -18,3 +18,5 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
+__version__ = "@SALOMEGEOM_GIT_SHA1@"