Salome HOME
bos #26458 Versioning of sources via git commit id (sha1)
authorvsr <vsr@opencascade.com>
Mon, 4 Oct 2021 09:35:15 +0000 (12:35 +0300)
committervsr <vsr@opencascade.com>
Mon, 4 Oct 2021 10:21:03 +0000 (13:21 +0300)
CMakeLists.txt
src/yacsorb/CMakeLists.txt
src/yacsorb/__init__.py [new file with mode: 0644]

index 1123a55041de501df7cd52c6a81e7300d498ea77..6dc9594d3ae0fa35d568e30a66f4a28af4b5a601 100644 (file)
 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.8 FATAL_ERROR)
 INCLUDE(CMakeDependentOption)
 
+# Project name
+# ============
+# original
 PROJECT(SalomeYACS 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 (optional)
 # ==============
 OPTION(SALOME_YACS_USE_KERNEL "Use SALOME KERNEL" ON)
@@ -276,7 +274,6 @@ ADD_SUBDIRECTORY(Demo)
 
 # Header configuration
 # ====================
-SALOME_XVERSION(${PROJECT_NAME})
 SALOME_CONFIGURE_FILE(YACS_version.h.in YACS_version.h INSTALL ${SALOME_INSTALL_HEADERS})
 
 # Configuration export
index 5963d864fe2bca6b5af9e32b8e587c546656a389..a205a760c40215cd995027d21f09b0035167d4a3 100644 (file)
@@ -26,3 +26,4 @@ SET(_python_SCRIPTS
 # --- rules ---
 
 SALOME_INSTALL_SCRIPTS("${_python_SCRIPTS}"  ${SALOME_INSTALL_PYTHON})
+SALOME_CONFIGURE_FILE(__init__.py __init__.py INSTALL ${SALOME_INSTALL_PYTHON}/salome/yacs)
diff --git a/src/yacsorb/__init__.py b/src/yacsorb/__init__.py
new file mode 100644 (file)
index 0000000..b4adfd5
--- /dev/null
@@ -0,0 +1,21 @@
+# -*- coding: iso-8859-1 -*-
+# Copyright (C) 2006-2021  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+__version__ = "@SALOMEYACS_GIT_SHA1@"