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

index 68f91de510b77107886c7ab6d347c460f391ac3e..2f4705da4a45398b6c82d6fb417b2ab9c3642ac8 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
-PROJECT(SalomeSMESH C CXX)
-
 INCLUDE(CMakeDependentOption)
 
-# Versioning
-# ===========
-# Project name, upper case
+# Project name
+# ============
+# original
+PROJECT(SalomeSMESH C CXX)
+# 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")
@@ -328,7 +326,6 @@ ENDIF()
 
 # Header configuration
 # ====================
-SALOME_XVERSION(${PROJECT_NAME})
 SALOME_CONFIGURE_FILE(SMESH_version.h.in SMESH_version.h INSTALL ${SALOME_INSTALL_HEADERS})
 
 # Configuration export
index 587f19c1f473bdb5efb4c4f5fb2672e754315e13..73c7690172359d14031a99600436c67cec5c2f8f 100644 (file)
@@ -1,3 +1,4 @@
 [SALOME SMESH] : @SALOMESMESH_VERSION@
 [DEVELOPMENT]  : @SALOMESMESH_VERSION_DEV@
 [DESCRIPTION]  : SALOME Mesh module
+[SHA1]         : @SALOMESMESH_GIT_SHA1@
index b6b47fa5686a57bc604bf33a96e9c92175278841..2150a6363a99ab37d0e700bab54cfddfbca1240e 100644 (file)
 
 # scripts / static
 SET(_bin_SCRIPTS
-  __init__.py
   smeshstudytools.py
 )
 
 # --- rules ---
 
-SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh)
\ No newline at end of file
+SALOME_INSTALL_SCRIPTS("${_bin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh)
+SALOME_CONFIGURE_FILE(__init__.py __init__.py INSTALL ${SALOME_INSTALL_PYTHON}/salome/smesh)
index 965aaa4fb494c46d7ffc981e7669d2ccac95ffdc..0d138181a28452d177ddea97e869c8015e1e68bc 100644 (file)
@@ -18,3 +18,4 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+__version__ = "@SALOMESMESH_GIT_SHA1@"