]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: last merge from BR_V5_DEV
authorprascle <prascle>
Tue, 3 Feb 2009 16:32:05 +0000 (16:32 +0000)
committerprascle <prascle>
Tue, 3 Feb 2009 16:32:05 +0000 (16:32 +0000)
salome_adm/cmake_files/FindBOOST.cmake
salome_adm/cmake_files/am2cmake.py
src/SALOMEDSImpl/SALOMEDSImpl_ScalarVariable.cxx

index c8af5d0033ba09e79070bab59144aeade4b3a268..0c4517cf6e01d2e13e4ade8b53703562c2a39670 100644 (file)
@@ -25,7 +25,7 @@ IF(BOOST_ROOT)
   FIND_LIBRARY(BOOST_LIB_THREAD libboost_thread-vc90-mt-gd-1_35 ${BOOST_ROOT}/lib)
   FIND_LIBRARY(BOOST_LIB_DATE_TIME libboost_date_time-vc90-mt-gd-1_35 ${BOOST_ROOT}/lib)
   SET(BOOST_LIBS ${BOOST_LIB_THREAD} ${BOOST_LIB_DATE_TIME})
-  SET(BOOST_CPPFLAGS -I${BOOST_INCLUDES})
+  SET(BOOST_CPPFLAGS -I${BOOST_INCLUDES} -DBOOST_DISABLE_ASSERTS)
 ELSE(BOOST_ROOT)
   SET(boost_thread -lboost_thread)
 ENDIF(BOOST_ROOT)
index 26ab21a36197dbb474292b86980f7d88c271c0f0..39218dbd99694ba0fc0c838ff0edd5a835129b96 100644 (file)
@@ -134,6 +134,11 @@ class CMakeFile(object):
         content = content.replace("-no-undefined -version-info 0:0:0", "")
         content = content.replace("-no-undefined -version-info 2:5:1", "")
         
+        # --
+        # Compatibility netgen plugin
+        # --
+        content = content.replace("../NETGEN/libNETGEN.la", "${NETGEN_LIBS}")
+        
         # --
         cas_list = [
             "BinLPlugin",
@@ -318,8 +323,29 @@ class CMakeFile(object):
             "MEDWrapper_V2_2",
             "SalomeIDLMED",
             ]
+        smesh_list = [
+            "MEFISTO2D",
+            "MeshDriverDAT",
+            "MeshDriverMED",
+            "MeshDriver",
+            "MeshDriverSTL",
+            "MeshDriverUNV",
+            "SalomeIDLSMESH",
+            "SMDS",
+            "SMESHClient",
+            "SMESHControls",
+            "SMESHDS",
+            "SMESHEngine",
+            "SMESHFiltersSelection",
+            "SMESHimpl",
+            "SMESHObject",
+            "SMESH",
+            "StdMeshersEngine",
+            "StdMeshersGUI",
+            "StdMeshers",
+            ]
         full_list = cas_list + kernel_list + gui_list
-        full_list += geom_list + med_list
+        full_list += geom_list + med_list + smesh_list
         # --
         full_list += [
             "boost_thread",
@@ -460,6 +486,17 @@ class CMakeFile(object):
                         INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
                         """)
                         pass
+                    if self.module == "netgenplugin":
+                        newlines.append("""
+                        SET(GEOM_ROOT_DIR $ENV{GEOM_ROOT_DIR})
+                        SET(MED_ROOT_DIR $ENV{MED_ROOT_DIR})
+                        SET(SMESH_ROOT_DIR $ENV{SMESH_ROOT_DIR})
+                        INCLUDE(${GEOM_ROOT_DIR}/adm_local/cmake_files/FindGEOM.cmake)
+                        INCLUDE(${MED_ROOT_DIR}/adm_local/cmake_files/FindMED.cmake)
+                        INCLUDE(${SMESH_ROOT_DIR}/adm_local/cmake_files/FindSMESH.cmake)
+                        INCLUDE(${CMAKE_SOURCE_DIR}/adm_local/cmake_files/FindNETGEN.cmake)
+                        """)
+                        pass
                     pass
                 pass
             # --
@@ -505,6 +542,16 @@ class CMakeFile(object):
                 SET(MED_ENABLE_GUI ON)
                 """)
                 pass
+            elif self.module == "smesh":
+                newlines.append("""
+                SET(SMESH_ENABLE_GUI ON)
+                """)
+                pass
+            elif self.module == "netgenplugin":
+                newlines.append("""
+                SET(NETGENPLUGIN_ENABLE_GUI ON)
+                """)
+                pass
             # --
             pass
         # --
@@ -957,6 +1004,21 @@ class CMakeFile(object):
         ''')
         # --
         newlines.append(r'''
+        IF(WINDOWS)
+        SET(targets)
+        SET(targets ${targets} MEFISTO2D)
+        FOREACH(target ${targets})
+        IF(name STREQUAL ${target})
+        SET(dir $ENV{F2CHOME})
+        STRING(REPLACE "\\\\" "/" dir ${dir})
+        SET(libadd ${libadd} ${dir}/LIBF77.lib)
+        SET(libadd ${libadd} ${dir}/LIBI77.lib)
+        ENDIF(name STREQUAL ${target})
+        ENDFOREACH(target ${targets})
+        ENDIF(WINDOWS)
+        ''')
+        # --
+        newlines.append(r'''
         SET(libs ${${amname}_LIBADD} ${${amname}_LDADD} ${${amname}_LDFLAGS})
         ''')
         if key == "bin_PROGRAMS":
@@ -998,6 +1060,13 @@ class CMakeFile(object):
         SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:LIBCMTD")
         ENDIF(name STREQUAL ${target})
         ENDFOREACH(target ${targets})
+        SET(targets)
+        SET(targets ${targets} MEFISTO2D)
+        FOREACH(target ${targets})
+        IF(name STREQUAL ${target})
+        SET_TARGET_PROPERTIES(${name} PROPERTIES LINK_FLAGS "/NODEFAULTLIB:MSVCRT")
+        ENDIF(name STREQUAL ${target})
+        ENDFOREACH(target ${targets})
         ENDIF(WINDOWS)
         ''')
         # --
@@ -1023,6 +1092,7 @@ class CMakeFile(object):
         SET(targets ${targets} GEOMEngine)
         SET(targets ${targets} MEDEngine)
         SET(targets ${targets} SMESHEngine)
+        SET(targets ${targets} SMESH)
         FOREACH(target ${targets})
         IF(name STREQUAL ${target})
         SET(var ${var} -DNOGDI)
@@ -1033,6 +1103,20 @@ class CMakeFile(object):
         # --
         newlines.append(r'''
         IF(WINDOWS)
+        SET(targets)
+        SET(targets ${targets} MEFISTO2D)
+        FOREACH(target ${targets})
+        IF(name STREQUAL ${target})
+        SET(dir $ENV{F2CHOME})
+        STRING(REPLACE "\\\\" "/" dir ${dir})
+        SET(var ${var} -I${dir})
+        ENDIF(name STREQUAL ${target})
+        ENDFOREACH(target ${targets})
+        ENDIF(WINDOWS)
+        ''')
+        # --
+        newlines.append(r'''
+        IF(WINDOWS)
         SET(var ${var} -D_USE_MATH_DEFINES)
         ENDIF(WINDOWS)
         ''')
@@ -1121,6 +1205,17 @@ class CMakeFile(object):
         FOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES})
         GET_FILENAME_COMPONENT(ext ${src} EXT)
         IF(ext STREQUAL .f)
+        IF(src STREQUAL trte.f)
+        SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
+        STRING(REPLACE ".f" ".c" src ${src})
+        SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src})
+        SET(output ${src})
+        ADD_CUSTOM_COMMAND(
+        OUTPUT ${output}
+        COMMAND f2c ${input}
+        MAIN_DEPENDENCY ${input}
+        )
+        ELSE(src STREQUAL trte.f)
         SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${src})
         STRING(REPLACE ".f" ".o" src ${src})
         SET(src ${CMAKE_CURRENT_BINARY_DIR}/${src})
@@ -1135,6 +1230,7 @@ class CMakeFile(object):
         COMMAND ${F77} -c -o ${output} ${input}
         MAIN_DEPENDENCY ${input}
         )
+        ENDIF(src STREQUAL trte.f)
         ENDIF(ext STREQUAL .f)
         SET(srcs ${srcs} ${src})
         ENDFOREACH(src ${${amname}_SOURCES} ${dist_${amname}_SOURCES})
@@ -1178,6 +1274,7 @@ class CMakeFile(object):
         newlines.append(r'''
         SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL %s_EXPORTS)
         '''%(upper_name))
+        # --
         newlines.append(r'''
         IF(name STREQUAL SalomeLauncher)
         SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SALOME%s_EXPORTS)
@@ -1278,6 +1375,21 @@ class CMakeFile(object):
         SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL MEFISTO2D_EXPORTS)
         ENDIF(name STREQUAL MEFISTO2D)
         ''')
+        newlines.append(r'''
+        IF(name STREQUAL SMESHObject)
+        SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SMESHOBJECT_EXPORTS)
+        ENDIF(name STREQUAL SMESHObject)
+        ''')
+        newlines.append(r'''
+        IF(name STREQUAL _libSMESH_Swig)
+        SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL SMESH_SWIG_EXPORTS)
+        ENDIF(name STREQUAL _libSMESH_Swig)
+        ''')
+        newlines.append(r'''
+        IF(name STREQUAL NETGENPluginGUI)
+        SET_TARGET_PROPERTIES(${name} PROPERTIES DEFINE_SYMBOL NETGENPLUGIN_GUI_EXPORTS)
+        ENDIF(name STREQUAL NETGENPluginGUI)
+        ''')
         # --
         self.setLibAdd(key, newlines)
         # --
index 3149d8738693532f5e145ffadd16bf35f1969c95..619e22ccc5fffba8505b077c79d4437d10bc2569 100644 (file)
@@ -24,6 +24,8 @@
 #include "SALOMEDSImpl_ScalarVariable.hxx"
 #include "SALOMEDSImpl_GenericVariable.hxx"
 #include <iostream>
+#include <cstdlib>
+
 using namespace std;
 
 //============================================================================