#
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11 FATAL_ERROR)
-#INCLUDE(CMakeDependentOption)
+
+# Project name
+# ============
+# original
PROJECT(MEDCoupling C CXX)
+# upper case
+STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
IF (${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.3)
ENDIF()
-# Versioning
-# ===========
-# Project name, 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})
-
# Common CMake macros
SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake files")
IF(EXISTS ${CONFIGURATION_ROOT_DIR})
MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !")
ENDIF()
+# Versioning
+# ===========
+SALOME_SETUP_VERSION(9.7.0)
+MESSAGE(STATUS "Building ${PROJECT_NAME_UC} ${${PROJECT_NAME_UC}_VERSION} from \"${${PROJECT_NAME_UC}_GIT_SHA1}\"")
+
# Platform setup
# ==============
INCLUDE(SalomeSetupPlatform)
# Header configuration
# ====================
-SALOME_XVERSION(${PROJECT_NAME})
SALOME_CONFIGURE_FILE(MEDCoupling_version.h.in MEDCoupling_version.h INSTALL ${MEDCOUPLING_INSTALL_HEADERS})
# Accumulate environment variables for MED module
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
-ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS})
+ADD_DEFINITIONS(${PYTHON_DEFINITIONS} ${NUMPY_DEFINITIONS} ${SCIPY_DEFINITIONS} -DMEDCOUPLING_GIT_SHA1=\"${MEDCOUPLING_GIT_SHA1}\")
SET_SOURCE_FILES_PROPERTIES(medcoupling.i PROPERTIES CPLUSPLUS ON)
IF(WIN32)
%include "ParaMEDMEMCommon.i"
#endif
+%constant const char __version__[]=MEDCOUPLING_GIT_SHA1;
+
%{
static const char SEQ_INTERPOL_EXT[]="Sequential interpolator";
static const char MEDFILEIO_EXT[]="MED file I/O";