From b9c215df84cc22beab1535fb31fa0f4d070b14fe Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 20 Aug 2013 07:36:29 +0000 Subject: [PATCH] Update with KERNEL file. --- .../cmake_files/SalomeMacros.cmake | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/adm_local_without_kernel/cmake_files/SalomeMacros.cmake b/adm_local_without_kernel/cmake_files/SalomeMacros.cmake index 3498c355b..d26725b51 100755 --- a/adm_local_without_kernel/cmake_files/SalomeMacros.cmake +++ b/adm_local_without_kernel/cmake_files/SalomeMacros.cmake @@ -462,3 +462,27 @@ MACRO(SALOME_ADD_MPI_TO_HDF5) SET(HDF5_DEFINITIONS "${HDF5_DEFINITIONS} ${MPI_DEFINITIONS}") SET(HDF5_LIBRARIES ${HDF5_LIBRARIES} ${MPI_LIBRARIES}) ENDMACRO(SALOME_ADD_MPI_TO_HDF5) + +#################################################################### +# SALOME_XVERSION() +# +# Computes hexadecimal version of SALOME package +# +# USAGE: SALOME_XVERSION(package) +# +# ARGUMENTS: +# +# package: IN: SALOME package name +# +# The macro reads SALOME package version from PACKAGE_VERSION variable +# (note package name in uppercase as assumed for SALOME modules); +# hexadecimal version value in form 0xAABBCC (where AA, BB and CC are +# major, minor and maintenance components of package version in +# hexadecimal form) is put to the PACKAGE_XVERSION variable +MACRO(SALOME_XVERSION pkg) + STRING(TOUPPER ${pkg} _pkg_UC) + IF(${_pkg_UC}_VERSION) + EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; t=sys.argv[-1].split(\".\") ; t[:]=(int(elt) for elt in t) ; sys.stdout.write(\"0x%02x%02x%02x\"%tuple(t))" ${${_pkg_UC}_VERSION} + OUTPUT_VARIABLE ${_pkg_UC}_XVERSION) + ENDIF() +ENDMACRO(SALOME_XVERSION) -- 2.39.2