From: mpa Date: Thu, 7 Nov 2013 12:53:12 +0000 (+0000) Subject: CMake: Update path and version variables for current build system X-Git-Tag: V7_3_0a1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=03a3a0c18b33a6b328c66cbc805ac08d46ca6995;p=modules%2Fmed.git CMake: Update path and version variables for current build system --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f3dfd0af5..feb00d5e1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,10 +33,7 @@ SET(${PROJECT_NAME_UC}_MINOR_VERSION 2) 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}) -# Temporary backward compatibility: -SET(VERSION ${${PROJECT_NAME_UC}_VERSION}) -SET(XVERSION 0x0${${PROJECT_NAME_UC}_MAJOR_VERSION}0${${PROJECT_NAME_UC}_MINOR_VERSION}0${${PROJECT_NAME_UC}_PATCH_VERSION}) -SET(VERSION_DEV "0") +SET(${PROJECT_NAME_UC}_VERSION_DEV 1) # # Kernel detection comes before user options to be @@ -242,15 +239,11 @@ MARK_AS_ADVANCED(SALOME_INSTALL_SCRIPT_SCRIPTS SALOME_INSTALL_SCRIPT_DATA SALOME MARK_AS_ADVANCED(SALOME_INSTALL_APPLISKEL_SCRIPTS SALOME_INSTALL_APPLISKEL_PYTHON SALOME_INSTALL_CMAKE SALOME_INSTALL_CMAKE_LOCAL SALOME_INSTALL_RES) MARK_AS_ADVANCED(SALOME_INSTALL_PYTHON SALOME_INSTALL_PYTHON_SHARED SALOME_MED_INSTALL_RES_DATA SALOME_MED_INSTALL_RES_SCRIPTS SALOME_INSTALL_DOC) -# Configuration of MED_version.h.in - -SET(input ${PROJECT_SOURCE_DIR}/MED_version.h.in) -SET(output ${PROJECT_BINARY_DIR}/MED_version.h) -MESSAGE(STATUS "Creation of ${output}") -CONFIGURE_FILE(${input} ${output} @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MED_version.h DESTINATION ${SALOME_INSTALL_HEADERS}) -CONFIGURE_FILE(VERSION.in VERSION @ONLY) -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION ${SALOME_INSTALL_BINS}) +# Header configuration +# ==================== +SALOME_XVERSION(${PROJECT_NAME}) +SALOME_CONFIGURE_FILE(MED_version.h.in MED_version.h INSTALL ${SALOME_INSTALL_HEADERS}) +SALOME_CONFIGURE_FILE(VERSION.in VERSION INSTALL ${SALOME_INSTALL_BINS}) # Accumulate environment variables for MED module SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS} diff --git a/MED_version.h.in b/MED_version.h.in index 1dc0307cd..b5ebe7528 100644 --- a/MED_version.h.in +++ b/MED_version.h.in @@ -27,14 +27,22 @@ #if !defined(__MED_VERSION_H__) #define __MED_VERSION_H__ -/* - MED_VERSION is (major << 16) + (minor << 8) + patch. +/*! + Specify version of SALOME MED module, as follows + + SALOMEMED_VERSION_MAJOR : (integer) number identifying major version + SALOMEMED_VERSION_MINOR : (integer) number identifying minor version + SALOMEMED_VERSION_MAINTENANCE : (integer) number identifying maintenance version + SALOMEMED_VERSION_STR : (string) complete version number "major.minor.maintenance" + SALOMEMED_VERSION : (hex) complete version number (major << 16) + (minor << 8) + maintenance + SALOMEMED_DEVELOPMENT : (integer) indicates development version when set to 1 */ -// MED_VERSION is reserved enum of MEDMEM, -// thus we use alternative constant name for SALOME MED module -#define SALOMEMED_VERSION_STR "@VERSION@" -#define SALOMEMED_VERSION @XVERSION@ -#define SALOMEMED_DEVELOPMENT @VERSION_DEV@ +#define SALOMEMED_VERSION_MAJOR @SALOMEMED_MAJOR_VERSION@ +#define SALOMEMED_VERSION_MINOR @SALOMEMED_MINOR_VERSION@ +#define SALOMEMED_VERSION_MAINTENANCE @SALOMEMED_PATCH_VERSION@ +#define SALOMEMED_VERSION_STR "@SALOMEMED_VERSION@" +#define SALOMEMED_VERSION @SALOMEMED_XVERSION@ +#define SALOMEMED_DEVELOPMENT @SALOMEMED_VERSION_DEV@ #endif // __MED_VERSION_H__ diff --git a/VERSION.in b/VERSION.in index bbf8f49d9..2d9a4e3fa 100755 --- a/VERSION.in +++ b/VERSION.in @@ -1,3 +1,3 @@ -[SALOME MED] : @VERSION@ -[DEVELOPMENT] : @VERSION_DEV@ +[SALOME MED] : @SALOMEMED_VERSION@ +[DEVELOPMENT] : @SALOMEMED_VERSION_DEV@ [DESCRIPTION] : SALOME Med module diff --git a/doc/doxygen/static/header.html.in b/doc/doxygen/static/header.html.in index cd9329091..5b289ac9d 100755 --- a/doc/doxygen/static/header.html.in +++ b/doc/doxygen/static/header.html.in @@ -19,5 +19,5 @@ $extrastylesheet
-
Version: @VERSION@
+
Version: @SALOMEMED_VERSION@
diff --git a/doc/salome/tui/static/header.html.in b/doc/salome/tui/static/header.html.in index cd9329091..5b289ac9d 100755 --- a/doc/salome/tui/static/header.html.in +++ b/doc/salome/tui/static/header.html.in @@ -19,5 +19,5 @@ $extrastylesheet
-
Version: @VERSION@
+
Version: @SALOMEMED_VERSION@
diff --git a/resources/MEDCatalog.xml.in b/resources/MEDCatalog.xml.in index bc47e3265..385061c87 100644 --- a/resources/MEDCatalog.xml.in +++ b/resources/MEDCatalog.xml.in @@ -77,7 +77,7 @@ MEDOP Factory MED Guillaume Boulant - @VERSION@ + @SALOMEMED_VERSION@ Factory of SALOME components for MED Field operations 0 diff --git a/resources/SalomeApp.xml.in b/resources/SalomeApp.xml.in index 37d25a2d5..586fea8df 100644 --- a/resources/SalomeApp.xml.in +++ b/resources/SalomeApp.xml.in @@ -28,7 +28,7 @@ - +
diff --git a/src/MEDOP/doc/sphinx/conf.py.in b/src/MEDOP/doc/sphinx/conf.py.in index 83474ef37..9c8bdda8f 100644 --- a/src/MEDOP/doc/sphinx/conf.py.in +++ b/src/MEDOP/doc/sphinx/conf.py.in @@ -34,7 +34,7 @@ extensions = ['sphinx.ext.autodoc'] intersphinx_mapping = {'http://docs.python.org': None} # Add any paths that contain templates here, relative to this directory. -templates_path = [os.path.join('@srcdir@','_templates')] +templates_path = [os.path.join('@CMAKE_CURRENT_SOURCE_DIR@','_templates')] # The suffix of source filenames. source_suffix = '.rst' @@ -54,9 +54,9 @@ copyright = '2010 CEA/DEN, EDF R&D, OPEN CASCADE, G. Boulant, A. Geay' # built documents. # # The short X.Y version. -version = '@SHORT_VERSION@' +version = '@SALOMEMED_VERSION@' # The full version, including alpha/beta/rc tags. -release = '@VERSION@' +release = '@SALOMEMED_VERSION@' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -132,7 +132,7 @@ html_style = 'medop.css' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = [os.path.join('@srcdir@','_static')] +html_static_path = [os.path.join('@CMAKE_CURRENT_SOURCE_DIR@','_static')] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. @@ -200,7 +200,7 @@ latex_documents = [ # The name of an image file (relative to this directory) to place at the top of # the title page. -latex_logo = os.path.join("@srcdir@","_static","head.png") +latex_logo = os.path.join("@CMAKE_CURRENT_SOURCE_DIR@","_static","head.png") # For "manual" documents, if this is true, then toplevel headings are parts, # not chapters. @@ -219,5 +219,5 @@ latex_use_modindex = False # ------------------------------------------------ # The rst_epilog can be used to define variable in conf.py and use the # values of these variables in the rst text files. -srcdir = '@srcdir@' +srcdir = '@CMAKE_CURRENT_SOURCE_DIR@' rst_epilog = '.. |SPHINXDOC_SRCDIR| replace:: %s' % srcdir diff --git a/src/ParaMEDMEM/README_JR b/src/ParaMEDMEM/README_JR index f2073c79f..762dc9e47 100644 --- a/src/ParaMEDMEM/README_JR +++ b/src/ParaMEDMEM/README_JR @@ -91,14 +91,14 @@ C MED_SRC/src/ParaMEDMEM/Test/Makefile.in : . Prise en compte de $(MED_WITH_KERNEL) avec : ifeq ($(MED_WITH_KERNEL),yes) LDFLAGSFORBIN += $(LDFLAGS) -lm $(MED3_LIBS) $(HDF5_LIBS) $(MPI_LIBS) \ - -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome -lmed_V2_1 -lparamed -lmedmem \ + -L$(CMAKE_BINARY_DIR)/lib@LIB_LOCATION_SUFFIX@/salome -lmed_V2_1 -lparamed -lmedmem \ ${KERNEL_LDFLAGS} -lSALOMELocalTrace -lSALOMEBasics \ $(CPPUNIT_LIBS) \ -lParaMEDMEMTest endif ifeq ($(MED_WITH_KERNEL),no) LDFLAGSFORBIN += $(LDFLAGS) -lm $(MED3_LIBS) $(HDF5_LIBS) $(MPI_LIBS) \ - -L$(top_builddir)/lib@LIB_LOCATION_SUFFIX@/salome -lmed_V2_1 -lparamed -linterpkernel -lmedmem \ + -L$(CMAKE_BINARY_DIR)/lib@LIB_LOCATION_SUFFIX@/salome -lmed_V2_1 -lparamed -linterpkernel -lmedmem \ ${KERNEL_LDFLAGS} ${FVM_LIBS} ${CPPUNIT_LIBS} -L/data/tmpawa/vb144235/bft_install/lib -lbft\ -lParaMEDMEMTest endif