Salome HOME
CMake: Update path and version variables for current build system
authormpa <mpa@opencascade.com>
Thu, 7 Nov 2013 12:53:12 +0000 (12:53 +0000)
committermpa <mpa@opencascade.com>
Thu, 7 Nov 2013 12:53:12 +0000 (12:53 +0000)
CMakeLists.txt
MED_version.h.in
VERSION.in
doc/doxygen/static/header.html.in
doc/salome/tui/static/header.html.in
resources/MEDCatalog.xml.in
resources/SalomeApp.xml.in
src/MEDOP/doc/sphinx/conf.py.in
src/ParaMEDMEM/README_JR

index f3dfd0af50675618fd7a23c03ad4cdea8a1070c0..feb00d5e156b7bf755f423d012c33f3f4c941707 100644 (file)
@@ -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}
index 1dc0307cdc63fb26aa8cb387b5fde9687c34f1b5..b5ebe752834c1af479307964cdd466779818bfd3 100644 (file)
 #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__
index bbf8f49d9c7e645f1f79101b8b4b0f14778c3025..2d9a4e3fabf4972bfda6546c5db668db7792181e 100755 (executable)
@@ -1,3 +1,3 @@
-[SALOME MED]  : @VERSION@
-[DEVELOPMENT] : @VERSION_DEV@
+[SALOME MED]  : @SALOMEMED_VERSION@
+[DEVELOPMENT] : @SALOMEMED_VERSION_DEV@
 [DESCRIPTION] : SALOME Med module
index cd9329091cc664d09457377302e6d49acf311a30..5b289ac9d65a267e8eb5a0a76ada1d0ee3781b4c 100755 (executable)
@@ -19,5 +19,5 @@ $extrastylesheet
 <body>
 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
 
-<div id="titlearea"><div align="right"><div class="version">Version: @VERSION@</div></div></div>
+<div id="titlearea"><div align="right"><div class="version">Version: @SALOMEMED_VERSION@</div></div></div>
 <!-- end header part -->
index cd9329091cc664d09457377302e6d49acf311a30..5b289ac9d65a267e8eb5a0a76ada1d0ee3781b4c 100755 (executable)
@@ -19,5 +19,5 @@ $extrastylesheet
 <body>
 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
 
-<div id="titlearea"><div align="right"><div class="version">Version: @VERSION@</div></div></div>
+<div id="titlearea"><div align="right"><div class="version">Version: @SALOMEMED_VERSION@</div></div></div>
 <!-- end header part -->
index bc47e3265bd7cd4e315206c67385b3a767421a61..385061c8743ade3d1c8ff31cb6096d09f867e309 100644 (file)
@@ -77,7 +77,7 @@
                <component-username>MEDOP Factory</component-username>
                <component-type>MED</component-type>
                <component-author>Guillaume Boulant</component-author>
-               <component-version>@VERSION@</component-version>
+               <component-version>@SALOMEMED_VERSION@</component-version>
                <component-comment>Factory of SALOME components for MED Field operations</component-comment>
                <component-multistudy>0</component-multistudy>
         </component>
index 37d25a2d560195ce423c476742f19de35c8cc3b4..586fea8df8225b813f63befcac231eba0d3f8079 100644 (file)
@@ -28,7 +28,7 @@
     <parameter name="icon" value="MEDOP.png"/>
     <parameter name="documentation" value="med_help"/>
     <parameter name="library"       value="MEDOPGUI"/>
-    <parameter name="version"       value="@VERSION@"/>
+    <parameter name="version"       value="@SALOMEMED_VERSION@"/>
   </section>
   <section name="med_help" >
     <parameter name="sub_menu"          value="%1 module"/>
index 83474ef37a7fc61389ed213740fc589177c5451b..9c8bdda8fd552c73d3c1dda7f9502df517bd7204 100644 (file)
@@ -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
index f2073c79f0e98b93fee38b45c965b55db210056d..762dc9e47127f8291414ed25a96822f14146bad6 100644 (file)
@@ -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