]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Compilation SALOME by CMake(windows/linux)
authorana <ana@opencascade.com>
Wed, 19 Sep 2012 15:30:47 +0000 (15:30 +0000)
committerana <ana@opencascade.com>
Wed, 19 Sep 2012 15:30:47 +0000 (15:30 +0000)
47 files changed:
src/INTERP_KERNEL/CMakeLists.txt
src/INTERP_KERNEL/InterpolationUtils.hxx
src/INTERP_KERNELTest/CMakeLists.txt
src/MED/CMakeLists.txt
src/MEDCalculator/CMakeLists.txt
src/MEDCalculator/Swig/CMakeLists.txt
src/MEDCalculator/Test/CMakeLists.txt
src/MEDCoupling/CMakeLists.txt
src/MEDCoupling/MEDCouplingTimeDiscretization.hxx
src/MEDCoupling/Test/CMakeLists.txt
src/MEDCouplingCorba/CMakeLists.txt
src/MEDCouplingCorba/Client/CMakeLists.txt
src/MEDCouplingCorba/Test/CMakeLists.txt
src/MEDCouplingCorba_Swig/CMakeLists.txt
src/MEDCouplingCorba_Swig/Client/CMakeLists.txt
src/MEDCoupling_Swig/CMakeLists.txt
src/MEDGUI/CMakeLists.txt
src/MEDLoader/CMakeLists.txt
src/MEDLoader/SauvMedConvertor.cxx
src/MEDLoader/Swig/CMakeLists.txt
src/MEDLoader/Test/CMakeLists.txt
src/MEDMEM/CMakeLists.txt
src/MEDMEMBinTest/CMakeLists.txt
src/MEDMEMCppTest/CMakeLists.txt
src/MEDMEM_I/CMakeLists.txt
src/MEDMEM_SWIG/CMakeLists.txt
src/MEDPartitioner/CMakeLists.txt
src/MEDPartitioner/MEDPARTITIONER.hxx
src/MEDPartitioner/Test/CMakeLists.txt
src/MEDSPLITTER/CMakeLists.txt
src/MEDSPLITTER/Test/CMakeLists.txt
src/MEDSPLITTER_Swig/CMakeLists.txt
src/MEDWrapper/Base/CMakeLists.txt
src/MEDWrapper/Factory/CMakeLists.txt
src/MEDWrapper/V2_1/Core/CMakeLists.txt
src/MEDWrapper/V2_1/Wrapper/CMakeLists.txt
src/MEDWrapper/V2_2/CMakeLists.txt
src/MED_SWIG/CMakeLists.txt
src/MedClient/src/CMakeLists.txt
src/MedClient/test/environ/CMakeLists.txt
src/MedClient/test/test2/CMakeLists.txt
src/MedCorba_Swig/CMakeLists.txt
src/ParaMEDLoader/CMakeLists.txt
src/ParaMEDMEMTest/CMakeLists.txt
src/ParaMEDMEM_Swig/CMakeLists.txt
src/RENUMBER/CMakeLists.txt
src/RENUMBER/RENUMBERDefines.hxx

index f124ffcd5d2f59b0a17b2b8819bed58c97a6780a..8d9d2463a16270b3eb8a63cee32611a4c5186322 100644 (file)
@@ -66,7 +66,8 @@ INCLUDE_DIRECTORIES(
   )
 
 ADD_LIBRARY(interpkernel SHARED ${interpkernel_SOURCES})
-
+SET_TARGET_PROPERTIES(interpkernel PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(interpkernel ${PLATFORM_LIBS})
 INSTALL(TARGETS interpkernel DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB_RECURSE interpkernel_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 8205880a8a48ddbad4da037c9cac349d2002a026..322042e73be5b72c52b393d74cc278a9228967d0 100644 (file)
 #include <iostream>
 #include <limits>
 
+#ifdef WIN32
+  #ifdef min
+    #undef min
+  #endif
+#endif
+
 namespace INTERP_KERNEL
 {
   template<class ConnType, NumberingPolicy numPol>
@@ -438,7 +444,7 @@ namespace INTERP_KERNEL
             T21 = n[0][_Y]-n[2][_Y], T22 = n[1][_Y]-n[2][_Y];
           // matrix determinant
           double Tdet = T11*T22 - T12*T21;
-          if ( std::fabs( Tdet ) < std::numeric_limits<double>::min() )
+          if ( (std::fabs( Tdet) ) < (std::numeric_limits<double>::min()) )
             {
               bc[0]=1; bc[1]=bc[2]=0; // no solution
               return;
index 16747faeb6124e5d9fec982634e00c4ac513af81..78231018f06e1b2f628ec14b5d1d71451923c5e2 100644 (file)
@@ -68,17 +68,18 @@ IF(NOT MED_ENABLE_MICROMED)
     PerfTest.cxx
     )
   ADD_EXECUTABLE(PerfTest ${PerfTest_SOURCES})
-  SET_TARGET_PROPERTIES(PerfTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(PerfTest InterpKernelTest ${CPPUNIT_LIBS})
+  SET_TARGET_PROPERTIES(PerfTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+  TARGET_LINK_LIBRARIES(PerfTest InterpKernelTest ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
+  INSTALL(TARGETS PerfTest DESTINATION ${MED_salomebin_BINS})
 ENDIF(NOT MED_ENABLE_MICROMED)
 
 ADD_LIBRARY(InterpKernelTest SHARED ${InterpKernelTest_SOURCES})
-SET_TARGET_PROPERTIES(InterpKernelTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
+SET_TARGET_PROPERTIES(InterpKernelTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(InterpKernelTest medmem ${CPPUNIT_LIBS})
 
 ADD_EXECUTABLE(TestINTERP_KERNEL ${TestINTERP_KERNEL_SOURCES})
-SET_TARGET_PROPERTIES(TestINTERP_KERNEL PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestINTERP_KERNEL InterpKernelTest ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestINTERP_KERNEL PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestINTERP_KERNEL InterpKernelTest ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 ADD_TEST(TestINTERP_KERNEL TestINTERP_KERNEL)
 
 INSTALL(TARGETS TestINTERP_KERNEL DESTINATION ${MED_salomebin_BINS})
index a6362e34c59b57a4f538e5789a0ce21482d72f03..0fdffb561acf0eb2921055175bff28a92459066a 100644 (file)
@@ -21,6 +21,7 @@ INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${XDR_INCLUDE_DIRS}
   ${KERNEL_ROOT_DIR}/include/salome
   ${CMAKE_CURRENT_BINARY_DIR}/../../idl
@@ -29,16 +30,23 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints
-  )
+)
 
 SET(MEDEngine_SOURCES
   Med_Gen_i.cxx
   Med_Gen_Driver_i.cxx
-  )
+)
+
+SET(COMMON_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+IF(WINDOWS)
+  SET(COMMON_FLAGS "${COMMON_FLAGS} -DNOGDI")
+ENDIF(WINDOWS
+)
 
 ADD_LIBRARY(MEDEngine SHARED ${MEDEngine_SOURCES})
-SET_TARGET_PROPERTIES(MEDEngine PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDEngine MEDMEMImpl SalomeIDLMED ${TOOLSDS} ${SalomeHDFPersist} ${SalomeContainer} ${SalomeCommunication} ${SalomeLifeCycleCORBA})
+SET_TARGET_PROPERTIES(MEDEngine PROPERTIES COMPILE_FLAGS "${COMMON_FLAGS}")
+TARGET_LINK_LIBRARIES(MEDEngine MEDMEMImpl SalomeIDLMED ${TOOLSDS} ${SalomeHDFPersist} 
+  ${SalomeContainer} ${SalomeCommunication} ${SalomeLifeCycleCORBA} ${PLATFORM_LIBS})
 INSTALL(TARGETS MEDEngine DESTINATION ${MED_salomelib_LIBS})
 
 SET(MED_MED_salomescript_DATA
index 2e0b86c43353b339db6837306b082e3e98a4043c..8b29aca918e0410bbc159bf8f72ca59ae97472a0 100644 (file)
@@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(
   ${MED3_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${KERNEL_ROOT_DIR}/include/salome
   ${CMAKE_CURRENT_BINARY_DIR}/../../idl
   ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCouplingCorba
@@ -48,8 +49,8 @@ SET(medcalculator_SOURCES
 )
 
 ADD_LIBRARY(medcalculator SHARED ${medcalculator_SOURCES})
-SET_TARGET_PROPERTIES(medcalculator PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(medcalculator medloader medcouplingcorba ${KERNEL_LDFLAGS} ${SALOMELocalTrace} ${SalomeNS} ${OpUtil})
+SET_TARGET_PROPERTIES(medcalculator PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(medcalculator medloader medcouplingcorba ${KERNEL_LDFLAGS} ${SALOMELocalTrace} ${SalomeNS} ${OpUtil} ${OMNIORB_LIBS} ${PLATFORM_LIBS})
 INSTALL(TARGETS medcalculator DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB medcalculator_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 542ff7833719f142c5e62af07d943fa4cfea37e7..0ea866771b236e07b9411140ecbd9b472506bdb4 100644 (file)
@@ -18,7 +18,7 @@
 #
 # Author : Anthony Geay (CEA/DEN)
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
@@ -47,9 +47,13 @@ INSTALL(TARGETS medcalculatorspython DESTINATION ${MED_salomelib_LIBS})
 
 SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(MEDCalculator.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
 SWIG_ADD_MODULE(MEDCalculator python MEDCalculator.i)
-SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBRARIES} medcalculator)
+SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBS} medcalculator)
+SET_TARGET_PROPERTIES(_MEDCalculator PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_MEDCalculator PROPERTIES DEBUG_OUTPUT_NAME _MEDCalculator_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
 
 FILE(GLOB medcalculatorspython_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${medcalculatorspython_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
index f9aeda7087343d2b609f690bd276389a6cdc55a4..7f28318b22ed6bf2f21f0f5a6b081047501701f4 100644 (file)
@@ -38,8 +38,8 @@ SET(TestMEDCalculator_SOURCES
   )
 
 ADD_EXECUTABLE(TestMEDCalculator ${TestMEDCalculator_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCalculator PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCalculator medcalculatorspython medcalculator ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestMEDCalculator PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDCalculator medcalculatorspython medcalculator ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 ADD_TEST(TestMEDCalculator TestMEDCalculator)
 
 INSTALL(TARGETS TestMEDCalculator DESTINATION ${MED_salomebin_BINS})
index 476d77744c8a7b6a3553774ab3e88d4faa169df8..3c6271c3398e3585e44c6db2861f9f66e692ad3d 100644 (file)
@@ -55,11 +55,13 @@ SET(medcouplingremapper_SOURCES
   )
 
 ADD_LIBRARY(medcoupling SHARED ${medcoupling_SOURCES})
-TARGET_LINK_LIBRARIES(medcoupling interpkernel)
+SET_TARGET_PROPERTIES(medcoupling PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(medcoupling interpkernel ${PLATFORM_LIBS})
 INSTALL(TARGETS medcoupling DESTINATION ${MED_salomelib_LIBS})
 
 ADD_LIBRARY(medcouplingremapper SHARED ${medcouplingremapper_SOURCES})
-TARGET_LINK_LIBRARIES(medcouplingremapper medcoupling)
+TARGET_LINK_LIBRARIES(medcouplingremapper medcoupling ${PLATFORM_LIBS})
+SET_TARGET_PROPERTIES(medcouplingremapper PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
 INSTALL(TARGETS medcouplingremapper DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB medcoupling_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 79d6fa07a6bdde63e6ffb6b69e89b2dea8378f23..a16a117d3f62745adfb8e33518253e85d140a8c7 100644 (file)
 
 #include <vector>
 
+#ifdef WIN32\r
+  #ifdef max\r
+    #undef max\r
+  #endif\r
+\r
+  #ifdef min\r
+    #undef min\r
+  #endif\r
+#endif\r
+
 namespace ParaMEDMEM
 {
   class DataArrayDouble;
index 58665fe18a896f29e447b922d6d66f9ebdd87a7c..f0c4138b3e6962827c413b5ffbad406044eb1684 100644 (file)
@@ -19,7 +19,8 @@
 # Author : Anthony Geay (CEA/DEN)
 
 INCLUDE_DIRECTORIES(
-  $(CPPUNIT_INCLUDE_DIRS)
+  ${CPPUNIT_INCLUDE_DIRS}
+  ${PTHREADS_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}/..
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
@@ -52,18 +53,18 @@ SET(TestMEDCouplingExamples_SOURCES
   )
 
 ADD_EXECUTABLE(TestMEDCoupling ${TestMEDCoupling_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCoupling PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCoupling medcoupling ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestMEDCoupling PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDCoupling medcoupling ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 ADD_TEST(TestMEDCoupling TestMEDCoupling)
 
 ADD_EXECUTABLE(TestMEDCouplingRemapper ${TestMEDCouplingRemapper_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCouplingRemapper PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingRemapper medcouplingremapper ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestMEDCouplingRemapper PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDCouplingRemapper medcouplingremapper ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 ADD_TEST(TestMEDCouplingRemapper TestMEDCouplingRemapper)
 
 ADD_EXECUTABLE(TestMEDCouplingExamples ${TestMEDCouplingExamples_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCouplingExamples PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingExamples medcoupling ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestMEDCouplingExamples PROPERTIES COMPILE_FLAGS "${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDCouplingExamples medcoupling ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 ADD_TEST(TestMEDCouplingExamples TestMEDCouplingExamples)
 
 INSTALL(TARGETS TestMEDCoupling TestMEDCouplingRemapper DESTINATION ${MED_salomebin_BINS})
index 3a9e9d0353b983b2a5a12ba2485311638a262c59..07af5fb49f5881f07393dd7df47cd1fda04d859c 100644 (file)
 # Author : Anthony Geay (CEA/DEN)
 
 ADD_SUBDIRECTORY(Client)
-ADD_SUBDIRECTORY(Test)
+
+IF (CPPUNIT_IS_OK)
+  ADD_SUBDIRECTORY(Test)
+ENDIF (CPPUNIT_IS_OK)
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIRS}
@@ -48,8 +51,8 @@ SET(medcouplingcorba_SOURCES
   )
 
 ADD_LIBRARY(medcouplingcorba SHARED ${medcouplingcorba_SOURCES})
-SET_TARGET_PROPERTIES(medcouplingcorba PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(medcouplingcorba medcoupling SalomeIDLMED)
+SET_TARGET_PROPERTIES(medcouplingcorba PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(medcouplingcorba medcoupling SalomeIDLMED ${PLATFORM_LIBS})
 INSTALL(TARGETS medcouplingcorba DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB medcouplingcorba_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 002b333731a55aaac1acc3588d063d8649e2b424..c7486da92540a94fe5a055952d8585fb68fc8ff0 100644 (file)
@@ -41,8 +41,8 @@ SET(medcouplingclient_SOURCES
   )
 
 ADD_LIBRARY(medcouplingclient SHARED ${medcouplingclient_SOURCES})
-SET_TARGET_PROPERTIES(medcouplingclient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(medcouplingclient medcoupling SalomeIDLMED ${OMNIORB_LIBS})
+SET_TARGET_PROPERTIES(medcouplingclient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(medcouplingclient medcoupling SalomeIDLMED ${OMNIORB_LIBS} ${PLATFORM_LIBS})
 INSTALL(TARGETS medcouplingclient DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB medcouplingclient_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 3b2707fe3158a244f9d250ca6d0e0a6a0b04f2f5..ef36e359dae2e14bf4f3e137b01d079915dcec93 100644 (file)
@@ -20,6 +20,8 @@
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
+  ${CPPUNIT_INCLUDE_DIRS}
   ${KERNEL_ROOT_DIR}/include/salome
   ${CMAKE_CURRENT_BINARY_DIR}/../../../idl
   ${CMAKE_CURRENT_SOURCE_DIR}/..
@@ -36,8 +38,8 @@ SET(TestMEDCouplingCorbaServ_SOURCES
   )
 
 ADD_EXECUTABLE(TestMEDCouplingCorbaServ ${TestMEDCouplingCorbaServ_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCouplingCorbaServ PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaServ medcouplingcorba SalomeIDLMEDTests ${OMNIORB_LIBS})
+SET_TARGET_PROPERTIES(TestMEDCouplingCorbaServ PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaServ medcouplingcorba SalomeIDLMEDTests ${OMNIORB_LIBS} ${PLATFORM_LIBS})
 
 SET(TestMEDCouplingCorbaClt_SOURCES
   TestMEDCouplingCorbaClt.cxx
@@ -46,7 +48,7 @@ SET(TestMEDCouplingCorbaClt_SOURCES
   )
 
 ADD_EXECUTABLE(TestMEDCouplingCorbaClt ${TestMEDCouplingCorbaClt_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDCouplingCorbaClt PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaClt medcouplingclient SalomeIDLMEDTests ${OMNIORB_LIBS} ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestMEDCouplingCorbaClt PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDCouplingCorbaClt medcouplingclient SalomeIDLMEDTests ${OMNIORB_LIBS} ${CPPUNIT_LIBS} ${PLATFORM_LIBS} ${PTHREAD_LIBS})
 
 INSTALL(TARGETS TestMEDCouplingCorbaServ TestMEDCouplingCorbaClt DESTINATION ${MED_salomebin_BINS})
index e8c0f16de168034949b557634431b634f3f1ce39..78a20f1e0e127a82d7470bd2129118ad5199f1a0 100644 (file)
@@ -20,7 +20,7 @@
 
 ADD_SUBDIRECTORY(Client)
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
@@ -41,8 +41,11 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(MEDCouplingCorba python MEDCouplingCorba.i)
-SWIG_LINK_LIBRARIES(MEDCouplingCorba ${PYTHON_LIBRARIES} medcouplingcorba)
-SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(MEDCouplingCorba ${PYTHON_LIBS} medcouplingcorba ${PLATFORM_LIBS})
+SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingCorba_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
 
 INSTALL(TARGETS _MEDCouplingCorba DESTINATION ${MED_salomepythondir})
 INSTALL(FILES MEDCouplingCorba.i MEDCouplingCorbaTypemaps.i DESTINATION ${MED_salomeinclude_HEADERS})
index ba6299061cf8ae2cc27800cc073a2ec850a39a77..e92b1fafe35dfd4d33dde0ea1db99a8c43c80184 100644 (file)
@@ -18,7 +18,7 @@
 #
 # Author : Anthony Geay (CEA/DEN)
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
@@ -39,8 +39,11 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(MEDCouplingClient python MEDCouplingClient.i)
-SWIG_LINK_LIBRARIES(MEDCouplingClient ${PYTHON_LIBRARIES} medcouplingclient)
-SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(MEDCouplingClient ${PYTHON_LIBS} medcouplingclient)
+SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingClient_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
 
 INSTALL(TARGETS _MEDCouplingClient DESTINATION ${MED_salomepythondir})
 INSTALL(FILES MEDCouplingClient.i DESTINATION ${MED_salomeinclude_HEADERS})
index 8e47178bad361ba7a0dbdace2c7328a30a9744c9..bbd5f1848a4cd37687a092f9ddb4804028445d9d 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
-#INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/UseSWIG.cmake)
 
 SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(MEDCoupling.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}
+  ${CMAKE_CURRENT_BINARY_DIR}
+  ${CMAKE_BINARY_DIR}
   ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
@@ -38,19 +40,28 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(MEDCoupling python MEDCoupling.i)
-SWIG_LINK_LIBRARIES(MEDCoupling ${PYTHON_LIBRARIES} medcoupling)
+SWIG_LINK_LIBRARIES(MEDCoupling ${PYTHON_LIBS} ${PLATFORM_LIBS} medcoupling)
+SET_TARGET_PROPERTIES(_MEDCoupling PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
 
 SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 
 SWIG_ADD_MODULE(MEDCouplingRemapper python MEDCouplingRemapper.i)
-SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper)
+SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBS} medcouplingremapper)
+SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_MEDCouplingRemapper PROPERTIES DEBUG_OUTPUT_NAME _MEDCouplingRemapper_d)
+  SET_TARGET_PROPERTIES(_MEDCoupling PROPERTIES DEBUG_OUTPUT_NAME _MEDCoupling_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
+INSTALL(TARGETS _MEDCoupling _MEDCouplingRemapper DESTINATION ${MED_salomelib_LIBS})
 
 SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling.py ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py ${CMAKE_CURRENT_SOURCE_DIR}/libMEDCoupling_Swig.py)
-INSTALL(TARGETS _MEDCoupling _MEDCouplingRemapper DESTINATION ${MED_salomepythondir})
-INSTALL(FILES MEDCoupling.i MEDCouplingCommon.i MEDCouplingFinalize.i MEDCouplingRemapper.i MEDCouplingTypemaps.i DESTINATION ${MED_salomeinclude_HEADERS})
 INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
 
+INSTALL(FILES MEDCoupling.i MEDCouplingCommon.i MEDCouplingFinalize.i MEDCouplingRemapper.i MEDCouplingTypemaps.i DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES MEDCouplingBasicsTest.py MEDCouplingRemapperTest.py MEDCouplingDataForTest.py DESTINATION ${MED_salomescript_PYTHON})
+
 ADD_TEST(MEDCouplingBasicsTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingBasicsTest.py)
 ADD_TEST(MEDCouplingExamplesTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingExamplesTest.py)
 ADD_TEST(MEDCouplingRemapperTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingRemapperTest.py)
index ca343368e30967c6ada5f104f601ca7555b2cbc5..f6216e8525eae1b9b7b39be1c63dbe2d848852c8 100644 (file)
@@ -39,6 +39,7 @@ INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIRS}
   ${CAS_INCLUDE_DIRS}
   ${BOOST_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${KERNEL_ROOT_DIR}/include/salome
   ${GUI_ROOT_DIR}/include/salome
   ${CMAKE_CURRENT_BINARY_DIR}
@@ -55,10 +56,10 @@ SET(MEDGUITS_SOURCES
   MED_images.ts
   MED_msg_fr.ts
   MED_msg_en.ts
-  )
+)
 
 ADD_LIBRARY(MEDGUI SHARED ${MEDGUI_SOURCES} ${MEDGUI_HEADERS_MOC} ${MEDGUI_FORMS_HEADERS})
-SET_TARGET_PROPERTIES(MEDGUI PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDGUI medcalculator ${QT_MT_LIBS} ${CAS_KERNEL} ${BOOST_LIBS} ${GUI_LDFLAGS} ${SalomeApp} ${CAM} ${LightApp} ${qtx} ${suit} ${SalomeObject})
+SET_TARGET_PROPERTIES(MEDGUI PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS} ${OMNIORB_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(MEDGUI medcalculator ${QT_MT_LIBS} ${CAS_KERNEL} ${BOOST_LIBS} ${GUI_LDFLAGS} ${SalomeApp} ${CAM} ${LightApp} ${qtx} ${suit} ${SalomeObject} ${PLATFORM_LIBS} ${SalomeLifeCycleCORBA})
 INSTALL(TARGETS MEDGUI DESTINATION ${MED_salomelib_LIBS})
 QT4_INSTALL_TS_RESOURCES("${MEDGUITS_SOURCES}" "${MED_salomeres_DATA}")
index 11239cd643a5993098e6b59a8957a524e0e3185b..0a812c71a66ff5fe0564f735cf7c82844eb523dc 100644 (file)
@@ -48,7 +48,7 @@ SET(medloader_SOURCES
   )
 
 ADD_LIBRARY(medloader SHARED ${medloader_SOURCES})
-SET_TARGET_PROPERTIES(medloader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS}")
+SET_TARGET_PROPERTIES(medloader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(medloader medcoupling ${MED3_LIBS_C_ONLY} ${HDF5_LIBS})
 INSTALL(TARGETS medloader DESTINATION ${MED_salomelib_LIBS})
 
index 87ea169f6c8f13528aed4f5d2bddb30b02d51ee8..6b30397ec2173273ce717166636c855cae6b5e96 100644 (file)
@@ -773,9 +773,9 @@ double ASCIIReader::getDouble() const
   //  7.70000000000000-100  7.70000000000000+100  7.70000000000000+100
   //0123456789012345678901234567890123456789012345678901234567890123456789
   const size_t posE = 18;
-  if ( _curPos[posE] != 'E' && _curPos[posE] != 'e' )
+  std::string aStr (_curPos);
+  if ( aStr.find('E') < 0 && aStr.find('e') < 0 )
     {
-      std::string aStr (_curPos);
       if ( aStr.size() < posE+1 )
         THROW_IK_EXCEPTION("No more doubles (line #" << lineNb() << ")");
       aStr.insert( posE, "E", 1 );
index 694b7ac765f224ea900cd1338c8a2aed3bce1d5d..dece3560bbedcf6126da59298fe09eefc9e07bd6 100644 (file)
@@ -18,7 +18,7 @@
 #
 # Author : Anthony Geay (CEA/DEN)
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
@@ -28,32 +28,34 @@ SET_SOURCE_FILES_PROPERTIES(MEDLoader.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
+  ${MED3_INCLUDE_DIRS}
+  ${HDF5_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}
+  ${CMAKE_CURRENT_SOURCE_DIR}/..
   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling_Swig
   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Bases
-  )
-
-SWIG_ADD_MODULE(MEDLoader python MEDLoader.i)
-
-SWIG_LINK_LIBRARIES(MEDLoader ${PYTHON_LIBRARIES} medloader)
-
-INCLUDE_DIRECTORIES(
-  ${MED3_INCLUDE_DIRS}
-  ${HDF5_INCLUDE_DIRS}
-  ${CMAKE_CURRENT_SOURCE_DIR}/..
-  ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDCoupling
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Geometric2D
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/ExprEval
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/GaussPoints
-  )
+)
+
+SWIG_ADD_MODULE(MEDLoader python MEDLoader.i)
+SWIG_LINK_LIBRARIES(MEDLoader ${PYTHON_LIBS} ${PLATFORM_LIBS} medloader medcoupling)
+SET_TARGET_PROPERTIES(_MEDLoader PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_MEDLoader PROPERTIES DEBUG_OUTPUT_NAME _MEDLoader_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
+INSTALL(TARGETS _MEDLoader DESTINATION ${MED_salomelib_LIBS})
+
+INSTALL(FILES MEDLoader.i MEDLoaderTypemaps.i MEDLoaderCommon.i DESTINATION ${MED_salomeinclude_HEADERS})
 
-INSTALL(TARGETS _MEDLoader DESTINATION ${MED_salomepythondir})
-INSTALL(FILES MEDLoader.i MEDLoaderCommon.i MEDLoaderTypemaps.i DESTINATION ${MED_salomeinclude_HEADERS})
 SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py ${CMAKE_CURRENT_SOURCE_DIR}/libMEDLoader_Swig.py)
 INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
 
+INSTALL(FILES MEDLoaderDataForTest.py MEDLoaderTest.py MEDLoaderTest2.py MEDLoaderTest3.py DESTINATION ${MED_salomescript_PYTHON})
+
 ADD_TEST(MEDLoaderTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest.py)
 ADD_TEST(MEDLoaderTest2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest2.py)
 ADD_TEST(MEDLoaderTest3 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest3.py)
index 126184c5e9a61741609a57cd3804659a36d180da..eb4f5fcd6a48df67a822274900d8282a4e87e6b6 100644 (file)
@@ -40,13 +40,14 @@ SET(TestSauvLoader_SOURCES
   )
 
 ADD_EXECUTABLE(TestMEDLoader ${TestMEDLoader_SOURCES})
-SET_TARGET_PROPERTIES(TestMEDLoader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestMEDLoader medloader ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestMEDLoader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(TestMEDLoader medloader ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 ADD_TEST(TestMEDLoader TestMEDLoader)
 
 ADD_EXECUTABLE(TestSauvLoader ${TestSauvLoader_SOURCES})
-SET_TARGET_PROPERTIES(TestSauvLoader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(TestSauvLoader medloader ${CPPUNIT_LIBS})
+SET_TARGET_PROPERTIES(TestSauvLoader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+
+TARGET_LINK_LIBRARIES(TestSauvLoader medloader ${CPPUNIT_LIBS} ${PLATFORM_LIBS})
 ADD_TEST(TestSauvLoader TestSauvLoader)
 
 INSTALL(TARGETS TestMEDLoader TestSauvLoader DESTINATION ${MED_salomebin_BINS})
index 1484d97c826af07ce8089d03816a72308be839ea..98380852218f309602cbc64734dc083f5a73bcb7 100644 (file)
@@ -71,8 +71,8 @@ SET(medmem_SOURCES
   )
 
 ADD_LIBRARY(medmem SHARED ${medmem_SOURCES})
-SET_TARGET_PROPERTIES(medmem PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(medmem interpkernel ${MED3_LIBS_C_ONLY} ${HDF5_LIBS} ${XDR_LIBS})
+SET_TARGET_PROPERTIES(medmem PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(medmem interpkernel ${MED3_LIBS_C_ONLY} ${HDF5_LIBS} ${XDR_LIBS} ${PLATFORM_LIBS})
 INSTALL(TARGETS medmem DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB medmem_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 2dc0288eb4cb9d12676ca753100a56fb570e3d5a..12ffc1e5433934e9c38627f7f12a4752ff557814 100644 (file)
@@ -131,6 +131,15 @@ SET(testAnalFile_SOURCES testAnalFile.cxx)
 SET(test_MEDMEM_MeshingFlica_SOURCES test_MEDMEM_MeshingFlica.cxx)
 
 SET(testConvertPolygon_SOURCES testConvertPolygon.cxx)
+SET(create_mesh_SOURCES create_mesh.c)
+SET(create_mesh_c2q4s2_SOURCES create_mesh_c2q4s2.c)
+SET(create_mesh_c3h8q4_SOURCES create_mesh_c3h8q4.c)
+SET(create_mesh_c3h8q4_wrong_SOURCES create_mesh_c3h8q4_wrong.c)
+SET(create_mesh_c2q4s2_wrong_SOURCES create_mesh_c2q4s2_wrong.c)
+SET(create_grid_SOURCES create_grid.c)
+SET(create_mesh_c2q4_SOURCES create_mesh_c2q4.c)
+SET(create_mesh_c3h8_SOURCES create_mesh_c3h8.c)
+SET(create_poly3D_SOURCES create_poly3D.c)
 
 SET(ALLMEDMEMBIN_TESTS
   dumpInterpolation
@@ -185,17 +194,27 @@ SET(ALLMEDMEMBIN_TESTS
   testAnalFile
   test_MEDMEM_MeshingFlica
   testConvertPolygon
+  create_mesh 
+  create_mesh_c2q4s2 
+  create_mesh_c3h8q4 
+  create_mesh_c3h8q4_wrong
+  create_mesh_c2q4s2_wrong 
+  create_grid 
+  create_mesh_c2q4 
+  create_mesh_c3h8 
+  create_poly3D                  
   )
 
 FOREACH(ALLMEDMEMBIN_TEST ${ALLMEDMEMBIN_TESTS})
   ADD_EXECUTABLE(${ALLMEDMEMBIN_TEST} ${${ALLMEDMEMBIN_TEST}_SOURCES})
-  SET_TARGET_PROPERTIES(${ALLMEDMEMBIN_TEST} PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(${ALLMEDMEMBIN_TEST} medmem)
+  SET_TARGET_PROPERTIES(${ALLMEDMEMBIN_TEST} PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+  TARGET_LINK_LIBRARIES(${ALLMEDMEMBIN_TEST} medmem ${PLATFORM_LIBS})
 ENDFOREACH(ALLMEDMEMBIN_TEST ${ALLMEDMEMBIN_TESTS})
 
 INSTALL(TARGETS ${ALLMEDMEMBIN_TESTS} DESTINATION ${MED_salomebin_BINS})
 
 SET(MEDMEMBINTEST_PYOPT_TEST -c"import sys;import os;import subprocess;os.putenv(\"srcdir\",sys.argv[1]);sys.exit(subprocess.call([\"sh\",sys.argv[2]]))")
+
 ADD_TEST(check_convertToPoly ${PYTHON_EXECUTABLE} ${MEDMEMBINTEST_PYOPT_TEST} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/check_convertToPoly)
 ADD_TEST(check_duplicateMED ${PYTHON_EXECUTABLE} ${MEDMEMBINTEST_PYOPT_TEST} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/check_duplicateMED)
 ADD_TEST(check_ensight2med ${PYTHON_EXECUTABLE} ${MEDMEMBINTEST_PYOPT_TEST} ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/scripts/check_ensight2med)
index d85cee87ea5a51bdd19568315245f4678e390936..ad869500adb8db1b3f266f2a48c17cb6f3f0ed60 100644 (file)
@@ -114,15 +114,17 @@ SET(MEDMEMTest_VtkMeshDriver_fault_SOURCES
   )
 
 ADD_LIBRARY(MEDMEMCppTest SHARED ${MEDMEMCppTest_SOURCES})
-SET_TARGET_PROPERTIES(MEDMEMCppTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
+SET_TARGET_PROPERTIES(MEDMEMCppTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(MEDMEMCppTest medmem ${CPPUNIT_LIBS})
 
 SET(ALLMEDMEMCPP_TESTS TestMEDMEM MEDMEMTest_Array_fault MEDMEMTest_Connectivity_fault MEDMEMTest_Coordinate_fault MEDMEMTest_Family_fault MEDMEMTest_Field_fault MEDMEMTest_Grid_fault MEDMEMTest_MeshAndMeshing_fault MEDMEMTest_Support_fault MEDMEMTest_VtkFieldDriver_fault MEDMEMTest_VtkMeshDriver_fault)
 FOREACH(MEDMEMCPP_TEST ${ALLMEDMEMCPP_TESTS})
   ADD_EXECUTABLE(${MEDMEMCPP_TEST} ${${MEDMEMCPP_TEST}_SOURCES})
-  SET_TARGET_PROPERTIES(${MEDMEMCPP_TEST} PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(${MEDMEMCPP_TEST} MEDMEMCppTest)
+  SET_TARGET_PROPERTIES(${MEDMEMCPP_TEST} PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+  TARGET_LINK_LIBRARIES(${MEDMEMCPP_TEST} MEDMEMCppTest ${PLATFORM_LIBS})
 ENDFOREACH(MEDMEMCPP_TEST ${ALLMEDMEMCPP_TESTS})
 
 INSTALL(TARGETS MEDMEMCppTest DESTINATION ${MED_salomelib_LIBS})
 INSTALL(TARGETS ${ALLMEDMEMCPP_TESTS} DESTINATION ${MED_salomebin_BINS})
+INSTALL(FILES testMEDMEM.py DESTINATION ${MED_salomebin_BINS})
+INSTALL(FILES MEDMEMTest.hxx MEDMEMCppTestExport.hxx DESTINATION ${MED_salomeinclude_HEADERS})
index edba2fed85b85c8837a5dd906491c07c4dc9f2ad..1a9b7e745877f947126c043f145c74177a4ad6d6 100644 (file)
@@ -19,6 +19,7 @@
 
 INCLUDE_DIRECTORIES(
   ${OMNIORB_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
   ${KERNEL_ROOT_DIR}/include/salome
@@ -42,8 +43,9 @@ SET(MEDMEMImpl_SOURCES
   )
 
 ADD_LIBRARY(MEDMEMImpl SHARED ${MEDMEMImpl_SOURCES})
-SET_TARGET_PROPERTIES(MEDMEMImpl PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDMEMImpl medmem SalomeIDLMED)
+SET_TARGET_PROPERTIES(MEDMEMImpl PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(MEDMEMImpl medmem SalomeIDLMED ${PLATFORM_LIBS} ${SalomeLifeCycleCORBA} ${SALOMELocalTrace} ${SalomeCommunication} ${SalomeGenericObj} ${SalomeNS} ${OpUtil})
+
 INSTALL(TARGETS MEDMEMImpl DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB MEDMEMImpl_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index c721f6fa06c0d8e27d7ff2437c53b556a38bf33f..42a42423ae47949f2b504a4d5abc1da44d66eed5 100644 (file)
@@ -22,7 +22,7 @@ INCLUDE(${SWIG_USE_FILE})
 
 SET_SOURCE_FILES_PROPERTIES(libMEDMEM_Swig.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(libMEDMEM_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-SET_SOURCE_FILES_PROPERTIES(libMEDMEM_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
+SET_SOURCE_FILES_PROPERTIES(libMEDMEM_SwigPYTHON_wrap.cxx PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
@@ -37,10 +37,42 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(libMEDMEM_Swig python libMEDMEM_Swig.i)
-SWIG_LINK_LIBRARIES(libMEDMEM_Swig ${PYTHON_LIBRARIES} medmem)
+SWIG_LINK_LIBRARIES(libMEDMEM_Swig ${PYTHON_LIBS} medmem)
+SET_TARGET_PROPERTIES(_libMEDMEM_Swig PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS}")
 
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_libMEDMEM_Swig PROPERTIES DEBUG_OUTPUT_NAME _libMEDMEM_Swig_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
 INSTALL(TARGETS _libMEDMEM_Swig DESTINATION ${MED_salomepythondir})
+
 INSTALL(FILES libMEDMEM_Swig.i my_typemap.i MEDMEM_SWIG_Templates.hxx DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libMEDMEM_Swig.py DESTINATION ${MED_salomescript_PYTHON})
-INSTALL(FILES med2sauv sauv2med avs2med DESTINATION ${MED_salomescript_PYTHON}
+INSTALL(FILES medutilities.py ${CMAKE_CURRENT_BINARY_DIR}/libMEDMEM_Swig.py DESTINATION ${MED_salomepythondir})
+SET(SCRIPTS
+  medmem.py
+  med_test1.py
+  med_test2.py
+  med_test3.py
+  med_test_grid.py
+  med_test_skin.py
+  medMeshing_test.py
+  med_field_anal.py
+  med_opfield_test.py
+  med_opsupp_test.py
+  test_gibi.py
+  test_porflow.py
+  testDriverAscii.py
+  testGaussLocalization.py
+  test_profil_MedFieldDriver.py
+  testWriteAndFam.py
+  testMedMemGeneral.py
+  testMedMemCxxTests.py
+  dumpMEDMEM.py
+  ensightMedEnsight_test.py
+  medEnsightMed_test.py
+  medNumPy_test.py
+  med2sauv 
+  sauv2med 
+  avs2med
+)
+INSTALL(FILES ${SCRIPTS} DESTINATION ${MED_salomescript_PYTHON}
   PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
index c82e559be12bbcede4a3e6393b71e5079c19f8af..726e797800b7b95634acc39b97f1de4d1effd3a0 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-ADD_SUBDIRECTORY(Test)
+IF(CPPUNIT_IS_OK)
+  ADD_SUBDIRECTORY(Test)
+ENDIF(CPPUNIT_IS_OK)
 
 INCLUDE_DIRECTORIES(
   ${PARMETIS_INCLUDE_DIRS}
   ${METIS_INCLUDE_DIRS}
   ${SCOTCH_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
   ${METIS_INCLUDE_DIRS}
   ${LIBXML_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
   ${MPI_INCLUDE_DIRS}
+  ${PTHREADS_INCLUDE_DIRS}
   ${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader
   ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
@@ -69,58 +71,59 @@ SET(medpartitionercpp_SOURCES
   MEDPARTITIONER_SkyLineArray.cxx
   )
 
-SET(medpartitionercpp_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS}")
-SET(medpartitionercpp_LDFLAGS medloader ${LIBXML_LIBS})
-
-IF(MED_ENABLE_SCOTCH)
-  SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ScotchGraph.cxx)
-  SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_ScotchGraph.hxx)
-  SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${SCOTCH_DEFINITIONS}")
-  SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${SCOTCH_LIBS})
-ENDIF(MED_ENABLE_SCOTCH)
-
-IF(MPI_IS_OK)
-  IF(MED_ENABLE_PARMETIS)
-    SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ParMetisGraph.cxx
-      MEDPARTITIONER_UtilsPara.cxx
-      MEDPARTITIONER_JointFinder.cxx
-      )
-    SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_JointFinder.hxx MEDPARTITIONER_MetisGraph.hxx)
-    SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${MPI_DEFINITIONS} ${PARMETIS_DEFINITIONS}")
-    SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${PARMETIS_LIBS} ${MPI_LIBS})
-  ELSE(MED_ENABLE_PARMETIS)
-    SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES}
-      MEDPARTITIONER_UtilsPara.cxx
-      MEDPARTITIONER_JointFinder.cxx
-      )
-    SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${MPI_DEFINITIONS}")
-    SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${MPI_LIBS})
-  ENDIF(MED_ENABLE_PARMETIS)
-ELSE(MPI_IS_OK)
+SET(medpartitionercpp_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${LIBXML_DEFINITIONS} ${MPI_DEFINITIONS}")
+SET(medpartitionercpp_LDFLAGS
+  ${MED3_LIBS_C_ONLY}
+  ${HDF5_LIBS}
+  ${STDLIB}
+  ${LIBXML_LIBS}
+  ${MPI_LIBS}
+  interpkernel
+  medcoupling
+  medloader
+)
+IF(MED_ENABLE_PARMETIS)
+  SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_MetisGraph.hxx)
+  SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ParMetisGraph.cxx)
+  SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${PARMETIS_DEFINITIONS}")
+  SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${PARMETIS_LIBS})
+ELSE(MED_ENABLE_PARMETIS)  
   IF(MED_ENABLE_METIS)
+    SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_MetisGraph.hxx)  
     SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_MetisGraph.cxx)
-    SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_MetisGraph.hxx)
     SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${METIS_DEFINITIONS}")
     SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${METIS_LIBS})
   ENDIF(MED_ENABLE_METIS)
-ENDIF(MPI_IS_OK)
-
-
+  IF(MED_ENABLE_SCOTCH)
+    SET(medpartitionercpp_HEADERS_HXX ${medpartitionercpp_HEADERS_HXX} MEDPARTITIONER_ScotchGraph.hxx)
+    SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES} MEDPARTITIONER_ScotchGraph.cxx)
+    SET(medpartitionercpp_DEFINITIONS "${medpartitionercpp_DEFINITIONS} ${SCOTCH_DEFINITIONS}")
+    SET(medpartitionercpp_LDFLAGS ${medpartitionercpp_LDFLAGS} ${SCOTCH_LIBS})
+  ENDIF(MED_ENABLE_SCOTCH)    
+ENDIF(MED_ENABLE_PARMETIS)  
+  
 IF(MPI_IS_OK)
+  SET(medpartitionercpp_SOURCES ${medpartitionercpp_SOURCES}
+    MEDPARTITIONER_UtilsPara.cxx
+    MEDPARTITIONER_JointFinder.cxx
+  )
+ENDIF(MPI_IS_OK)                         
+  
+ADD_LIBRARY(medpartitionercpp SHARED ${medpartitionercpp_SOURCES})
+SET_TARGET_PROPERTIES(medpartitionercpp PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${medpartitionercpp_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(medpartitionercpp ${medpartitionercpp_LDFLAGS} ${PLATFORM_LIBS} ${PTHREAD_LIBS})
+INSTALL(TARGETS medpartitionercpp DESTINATION ${MED_salomelib_LIBS})
+  
+IF(MED_ENABLE_PARMETIS)
   ADD_EXECUTABLE(medpartitioner_para medpartitioner_para.cxx)
   SET_TARGET_PROPERTIES(medpartitioner_para PROPERTIES COMPILE_FLAGS "${medpartitionercpp_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(medpartitioner_para medpartitionercpp)
+  TARGET_LINK_LIBRARIES(medpartitioner_para medpartitionercpp ${medpartitionercpp_LDFLAGS})
   INSTALL(TARGETS medpartitioner_para DESTINATION ${MED_salomebin_BINS})
-ELSE(MPI_IS_OK)
+ELSE(MED_ENABLE_PARMETIS)
   ADD_EXECUTABLE(medpartitioner medpartitioner.cxx)
-  SET_TARGET_PROPERTIES(medpartitioner PROPERTIES COMPILE_FLAGS "${medpartitionercpp_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(medpartitioner medpartitionercpp)
+  SET_TARGET_PROPERTIES(medpartitioner PROPERTIES COMPILE_FLAGS "${PLATFORM_DEFINITIONS} ${medpartitionercpp_DEFINITIONS}")
+  TARGET_LINK_LIBRARIES(medpartitioner medpartitionercpp ${medpartitionercpp_LDFLAGS})
   INSTALL(TARGETS medpartitioner DESTINATION ${MED_salomebin_BINS})
-ENDIF(MPI_IS_OK)
-
-ADD_LIBRARY(medpartitionercpp SHARED ${medpartitionercpp_SOURCES})
-SET_TARGET_PROPERTIES(medpartitionercpp PROPERTIES COMPILE_FLAGS "${medpartitionercpp_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(medpartitionercpp ${medpartitionercpp_LDFLAGS})
-INSTALL(TARGETS medpartitionercpp DESTINATION ${MED_salomelib_LIBS})
+ENDIF(MED_ENABLE_PARMETIS)
 
 INSTALL(FILES ${medpartitionercpp_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
index 87310b46a9fe7deeef7d35db94e4a18146271320..3af09ff4c4d5836c6a7f7a1e92bbd76e9dbdd0d4 100755 (executable)
@@ -21,7 +21,7 @@
 #define __MEDPARTITIONER_HXX__
 
 #ifdef WIN32
-# if defined MEDPARTITIONER_EXPORTS || defined medpartitioner_EXPORTS
+# if defined MEDPARTITIONERCPP_EXPORTS || defined medpartitionercpp_EXPORTS
 #  define MEDPARTITIONER_EXPORT __declspec( dllexport )
 # else
 #  define MEDPARTITIONER_EXPORT __declspec( dllimport )
index e4594107bba3bd6ed7498b8ebecf5d66b77bbdf6..ee2bc2143d209fd5311c44d9825dee8cae0f4577 100644 (file)
@@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
   ${PARMETIS_INCLUDE_DIRS}
   ${METIS_INCLUDE_DIRS}
   ${SCOTCH_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
+  ${CPPUNIT_INCLUDE_DIRS}
   ${METIS_INCLUDE_DIRS}
   ${LIBXML_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
@@ -46,7 +46,7 @@ SET(MEDPARTITIONERTest_SOURCES
   MEDPARTITIONERTest.cxx
   )
 
-SET(MEDPARTITIONERTest_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
+SET(MEDPARTITIONERTest_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 SET(MEDPARTITIONERTest_LDFLAGS medpartitionercpp ${CPPUNIT_LIBS})
 
 IF(MED_ENABLE_SCOTCH)
index d6a25c29f91081503d59aed7d827ea1042d84a7e..6f4e730b0dda36f77fe8bffeab77d81f625d5046 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-ADD_SUBDIRECTORY(Test)
-
+IF(CPPUNIT_IS_OK)
+  ADD_SUBDIRECTORY(Test)
+ENDIF(CPPUNIT_IS_OK)
+  
 INCLUDE_DIRECTORIES(
   ${PARMETIS_INCLUDE_DIRS}
   ${METIS_INCLUDE_DIRS}
@@ -74,8 +76,8 @@ SET(medsplittercpp_SOURCES
   MEDSPLITTER_JointExchangeData.cxx
   )
 
-SET(medsplittercpp_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS}")
-SET(medsplittercpp_LDFLAGS medmem ${LIBXML_LIBS})
+SET(medsplittercpp_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS} ${MPI_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+SET(medsplittercpp_LDFLAGS medmem ${LIBXML_LIBS} interpkernel ${MPI_LIBS} ${HDF5_LIBS} ${MED3_LIBS_C_ONLY} ${STDLIB} ${PLATFORM_LIBS})
 
 IF(MED_ENABLE_SCOTCH)
   SET(medsplittercpp_SOURCES ${medsplittercpp_SOURCES} MEDSPLITTER_SCOTCHGraph.cxx)
@@ -84,33 +86,41 @@ IF(MED_ENABLE_SCOTCH)
   SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${SCOTCH_LIBS})
 ENDIF(MED_ENABLE_SCOTCH)
 
+IF(MED_ENABLE_METIS)
+  SET(medsplittercpp_HEADERS_HXX ${medsplittercpp_HEADERS_HXX} MEDSPLITTER_METISGraph.hxx)
+ENDIF(MED_ENABLE_METIS)
+
 IF(MPI_IS_OK)
   IF(MED_ENABLE_PARMETIS)
     SET(medsplittercpp_SOURCES ${medsplittercpp_SOURCES} MEDSPLITTER_METISGraph.cxx)
-    SET(medsplittercpp_HEADERS_HXX ${medsplittercpp_HEADERS_HXX} MEDSPLITTER_METISGraph.hxx)
     SET(medsplittercpp_DEFINITIONS "${medsplittercpp_DEFINITIONS} ${MPI_DEFINITIONS} ${PARMETIS_DEFINITIONS}")
-    SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${PARMETIS_LIBS} ${MPI_LIBS})
+    SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${PARMETIS_LIBS})
   ENDIF(MED_ENABLE_PARMETIS)
 ELSE(MPI_IS_OK)
   IF(MED_ENABLE_METIS)
     SET(medsplittercpp_SOURCES ${medsplittercpp_SOURCES} MEDSPLITTER_METISGraph.cxx)
-    SET(medsplittercpp_HEADERS_HXX ${medsplittercpp_HEADERS_HXX} MEDSPLITTER_METISGraph.hxx)
     SET(medsplittercpp_DEFINITIONS "${medsplittercpp_DEFINITIONS} ${METIS_DEFINITIONS}")
     SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${METIS_LIBS})
   ENDIF(MED_ENABLE_METIS)
 ENDIF(MPI_IS_OK)
 
+SET(medsplitter_LDFLAGS ${medsplittercpp_LDFLAGS})
+IF(MED_ENABLE_KERNEL)
+  INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome)
+  SET(medsplittercpp_LDFLAGS ${medsplittercpp_LDFLAGS} ${BOSST_LIBS} ${SALOMELocalTrace})
+  SET(medsplitter_LDFLAGS ${medsplittercpp_LDFLAGS} ${SALOMEBasics})
+ENDIF(MED_ENABLE_KERNEL)
+
+ADD_EXECUTABLE(medsplitter medsplitter.cxx)
+SET_TARGET_PROPERTIES(medsplitter PROPERTIES COMPILE_FLAGS "${medsplittercpp_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(medsplitter medsplittercpp ${medsplitter_LDFLAGS})
+INSTALL(TARGETS medsplitter DESTINATION ${MED_salomebin_BINS})
 
 IF(MPI_IS_OK)
   ADD_EXECUTABLE(medsplitter_para medsplitter_para.cxx)
   SET_TARGET_PROPERTIES(medsplitter_para PROPERTIES COMPILE_FLAGS "${medsplittercpp_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(medsplitter_para medsplittercpp)
+  TARGET_LINK_LIBRARIES(medsplitter_para medsplittercpp ${medsplitter_LDFLAGS})
   INSTALL(TARGETS medsplitter_para DESTINATION ${MED_salomebin_BINS})
-ELSE(MPI_IS_OK)
-  ADD_EXECUTABLE(medsplitter medsplitter.cxx)
-  SET_TARGET_PROPERTIES(medsplitter PROPERTIES COMPILE_FLAGS "${medsplittercpp_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(medsplitter medsplittercpp)
-  INSTALL(TARGETS medsplitter DESTINATION ${MED_salomebin_BINS})
 ENDIF(MPI_IS_OK)
 
 ADD_LIBRARY(medsplittercpp SHARED ${medsplittercpp_SOURCES})
index 629834d305b604012f46cf9d860f5b2fc87a9220..387b3bb74ea56d3ea5bdd615a6e98f90ad9537ca 100644 (file)
@@ -21,12 +21,12 @@ INCLUDE_DIRECTORIES(
   ${PARMETIS_INCLUDE_DIRS}
   ${METIS_INCLUDE_DIRS}
   ${SCOTCH_INCLUDE_DIRS}
-  ${BOOST_INCLUDE_DIRS}
-  ${METIS_INCLUDE_DIRS}
+  ${BOOST_INCLUDE_DIRS} 
+  ${CPPUNIT_INCLUDE_DIRS}
   ${LIBXML_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
-  ${MPI_INCLUDE_DIRS}
+  ${MPI_INCLUDE_DIRS} 
   ${CMAKE_CURRENT_SOURCE_DIR}/..
   ${CMAKE_CURRENT_SOURCE_DIR}/../../MEDMEM
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNELTest # for BasicMainTest.cxx
@@ -35,63 +35,83 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/Geometric2D
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/ExprEval
   ${CMAKE_CURRENT_SOURCE_DIR}/../../INTERP_KERNEL/GaussPoints
-  )
+)
 
 SET(MEDSPLITTERTest_HEADERS_HXX
   MEDSPLITTERTest.hxx
   MEDSPLITTERTest_Utils.hxx
   MEDSPLITTERTest_defs.hxx
-  )
+)
 
 SET(MEDSPLITTERTest_SOURCES
   MEDSPLITTERTest.cxx
   MEDSPLITTERTest_MESHCollection.cxx
   MEDSPLITTERTest_ParallelTopology.cxx
   MEDSPLITTERTest_Utils.cxx
-  )
-
-SET(MEDSPLITTERTest_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS} ${CPPUNIT_DEFINITIONS}")
-SET(MEDSPLITTERTest_LDFLAGS medsplittercpp ${CPPUNIT_LIBS})
+)
 
-IF(MED_ENABLE_SCOTCH)
-  SET(MEDSPLITTERTest_DEFINITIONS "${MEDSPLITTERTest_DEFINITIONS} ${SCOTCH_DEFINITIONS}")
-ENDIF(MED_ENABLE_SCOTCH)
+SET(MEDSPLITTERTest_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${LIBXML_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${MPI_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+SET(MEDSPLITTERTest_LDFLAGS ${CPPUNIT_LIBS} ${MED3_LIBS_C_ONLY} medsplittercpp)
 
-IF(MPI_IS_OK)
+IF(MED_ENABLE_PARMETIS)
   SET(MEDSPLITTERTest_SOURCES
     ${MEDSPLITTERTest_SOURCES}
     ParaMEDSPLITTERTest_MeshSendReceive.cxx
     ParaMEDSPLITTERTest_ParaDomainSelector.cxx
     ParaMEDSPLITTERTest_medsplitter_para.cxx
-    )
-  SET(MEDSPLITTERTest_HEADERS_HXX ${MEDSPLITTERTest_HEADERS_HXX} ParaMEDSPLITTERTest.hxx)
-  IF(MED_ENABLE_PARMETIS)
-    SET(MEDSPLITTERTest_DEFINITIONS "${MEDSPLITTERTest_DEFINITIONS} ${MPI_DEFINITIONS} ${PARMETIS_DEFINITIONS}")
-  ENDIF(MED_ENABLE_PARMETIS)
-ELSE(MPI_IS_OK)
-  IF(MED_ENABLE_METIS)
-    SET(MEDSPLITTERTest_DEFINITIONS "${MEDSPLITTERTest_DEFINITIONS} ${METIS_DEFINITIONS}")
-  ENDIF(MED_ENABLE_METIS)
-ENDIF(MPI_IS_OK)
+    ParaMEDSPLITTERTest.hxx
+  )
+  SET(MEDSPLITTERTest_DEFINITIONS "${MEDSPLITTERTest_DEFINITIONS} ${PARMETIS_DEFINITIONS}")
+  SET(MEDSPLITTERTest_LDFLAGS ${MEDSPLITTERTest_LDFLAGS} ${PARMETIS_LIBS})
+ENDIF(MED_ENABLE_PARMETIS)
+
+IF(MED_ENABLE_METIS)
+  SET(MEDSPLITTERTest_DEFINITIONS "${MEDSPLITTERTest_DEFINITIONS} ${METIS_DEFINITIONS}")
+  SET(MEDSPLITTERTest_LDFLAGS ${MEDSPLITTERTest_LDFLAGS} ${METIS_LIBS})
+ENDIF(MED_ENABLE_METIS)
+                           
+IF(MED_ENABLE_KERNEL)
+  INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome)
+  SET(MEDSPLITTERTest_LDFLAGS ${MEDSPLITTERTest_LDFLAGS} ${SALOMELocalTrace})
+ENDIF(MED_ENABLE_KERNEL)
+      
+IF(MED_ENABLE_SCOTCH)
+  SET(MEDSPLITTERTest_DEFINITIONS "${MEDSPLITTERTest_DEFINITIONS} ${SCOTCH_DEFINITIONS}")
+  SET(MEDSPLITTERTest_LDFLAGS ${MEDSPLITTERTest_LDFLAGS} ${SCOTCH_LIBS})
+ENDIF(MED_ENABLE_SCOTCH)
+
+SET(SCRIPTS testMEDSPLITTER.py)
+
 
 
 IF(MPI_IS_OK)
-  ADD_EXECUTABLE(TestParaMEDSPLITTER TestParaMEDSPLITTER.cxx)
-  SET_TARGET_PROPERTIES(TestParaMEDSPLITTER PROPERTIES COMPILE_FLAGS "${MEDSPLITTERTest_DEFINITIONS}")
-  TARGET_LINK_LIBRARIES(TestParaMEDSPLITTER MEDSPLITTERTest)
-  INSTALL(TARGETS TestParaMEDSPLITTER DESTINATION ${MED_salomebin_BINS})
-ELSE(MPI_IS_OK)
+  IF(MED_ENABLE_PARMETIS)
+    SET(TestParaMEDSPLITTER_LDFLAGS ${MEDSPLITTERTest_LDFLAGS} MEDSPLITTERTest med_V2_1 medmem interpkernel medsplitter)
+    SET(SCRIPTS ${SCRIPTS}testMEDSPLITTER.py)
+    
+    ADD_EXECUTABLE(TestParaMEDSPLITTER TestParaMEDSPLITTER.cxx)
+    SET_TARGET_PROPERTIES(TestParaMEDSPLITTER PROPERTIES COMPILE_FLAGS "${MEDSPLITTERTest_DEFINITIONS}")
+    TARGET_LINK_LIBRARIES(TestParaMEDSPLITTER ${TestParaMEDSPLITTER_LDFLAGS})
+    INSTALL(TARGETS TestParaMEDSPLITTER DESTINATION ${MED_salomebin_BINS})
+  ENDIF(MED_ENABLE_PARMETIS)
+ELSE(MPI_IS_OK)  
   IF(MED_ENABLE_METIS)
+    SET(TestMEDSPLITTER_LDFLAGS ${MEDSPLITTERTest_LDFLAGSS} MEDSPLITTERTest med_V2_1 medmem interpkernel medsplitter)
+    IF(MED_ENABLE_KERNEL)
+      SET(MEDSPLITTERTest_LDFLAGS ${MEDSPLITTERTest_LDFLAGS} SALOMEBasics)
+    ENDIF(MED_ENABLE_KERNEL)
+    
     ADD_EXECUTABLE(TestMEDSPLITTER TestMEDSPLITTER.cxx)
     SET_TARGET_PROPERTIES(TestMEDSPLITTER PROPERTIES COMPILE_FLAGS "${MEDSPLITTERTest_DEFINITIONS}")
-    TARGET_LINK_LIBRARIES(TestMEDSPLITTER MEDSPLITTERTest)
+    TARGET_LINK_LIBRARIES(TestMEDSPLITTER ${TestMEDSPLITTER_LDFLAGS})
     INSTALL(TARGETS TestMEDSPLITTER DESTINATION ${MED_salomebin_BINS})
   ENDIF(MED_ENABLE_METIS)
 ENDIF(MPI_IS_OK)
-
+  
 ADD_LIBRARY(MEDSPLITTERTest SHARED ${MEDSPLITTERTest_SOURCES})
 SET_TARGET_PROPERTIES(MEDSPLITTERTest PROPERTIES COMPILE_FLAGS "${MEDSPLITTERTest_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(MEDSPLITTERTest ${MEDSPLITTERTest_LDFLAGS})
 INSTALL(TARGETS MEDSPLITTERTest DESTINATION ${MED_salomelib_LIBS})
 
 INSTALL(FILES ${MEDSPLITTERTest_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+INSTALL(FILES ${SCRIPTS} DESTINATION ${MED_salomebin_BINS})
index ebdef31248e6533b3d2c670c54cf95ddd0ae98e9..8cd10378db95d884e08c4e64c07ce1220a8c9a06 100644 (file)
@@ -17,7 +17,6 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
@@ -41,11 +40,13 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(libMEDSPLITTER_Swig python libMEDSPLITTER_Swig.i)
-SWIG_LINK_LIBRARIES(libMEDSPLITTER_Swig ${PYTHON_LIBRARIES} medsplittercpp)
-SET_TARGET_PROPERTIES(_libMEDSPLITTER_Swig PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS}")
-
+SWIG_LINK_LIBRARIES(libMEDSPLITTER_Swig ${PYTHON_LIBS} medsplittercpp)
+SET_TARGET_PROPERTIES(_libMEDSPLITTER_Swig PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_libMEDSPLITTER_Swig PROPERTIES DEBUG_OUTPUT_NAME _libMEDSPLITTER_Swig_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
 INSTALL(TARGETS _libMEDSPLITTER_Swig DESTINATION ${MED_salomepythondir})
 INSTALL(FILES libMEDSPLITTER_Swig.i DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libMEDSPLITTER_Swig.py MEDSPLITTER.py test_MEDSPLITTER.py DESTINATION ${MED_salomescript_PYTHON})
-INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_SOURCE_DIR}/MEDSPLITTER.py ${MED_salomescript_PYTHON})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libMEDSPLITTER_Swig.py DESTINATION ${MED_salomepythondir})
+INSTALL(FILES MEDSPLITTER.py test_MEDSPLITTER.py DESTINATION ${MED_salomescript_DATA})
 
index 863127fb373ecff0f285c58291c51f9fc71e572b..0de97a472e396bedcd9f16f2ace365c58331c46f 100644 (file)
 INCLUDE_DIRECTORIES(
   ${HDF5_INCLUDE_DIRS}
   ${BOOST_INCLUDE_DIRS}
-  ${KERNEL_ROOT_DIR}/include/salome
-  )
+)
+
+IF(MED_ENABLE_KERNEL)
+  INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome)
+ELSE(MED_ENABLE_KERNEL)
+  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/adm_local_without_kernel)
+ENDIF(MED_ENABLE_KERNEL)
 
 SET(MEDWrapperBase_SOURCES
   MED_Structures.cxx
@@ -34,7 +39,7 @@ SET(MEDWrapperBase_SOURCES
   )
 
 ADD_LIBRARY(MEDWrapperBase SHARED ${MEDWrapperBase_SOURCES})
-SET_TARGET_PROPERTIES(MEDWrapperBase PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS}")
+SET_TARGET_PROPERTIES(MEDWrapperBase PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(MEDWrapperBase ${BOOST_LIB_THREAD} ${BOOST_LIB_DATE_TIME})
 INSTALL(TARGETS MEDWrapperBase DESTINATION ${MED_salomelib_LIBS})
 
index cdbd05d78d6d5b5a431a96567d2d38451dad6891..2f9b3543a9a1c74df6ee31b613343949ca54d5c8 100644 (file)
@@ -29,26 +29,30 @@ INCLUDE_DIRECTORIES(
 IF(MED_ENABLE_KERNEL)
   INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome)
 ELSE(MED_ENABLE_KERNEL)
-  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/adm_local_without_kernel/unix)
+  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/adm_local_without_kernel)
 ENDIF(MED_ENABLE_KERNEL)  
 
 SET(MEDWrapper_SOURCES
   MED_Factory.cxx
-  )
+)
 
 SET(mprint_version_SOURCES
   mprint_version.cxx
   )
 
 ADD_LIBRARY(MEDWrapper SHARED ${MEDWrapper_SOURCES})
-SET_TARGET_PROPERTIES(MEDWrapper PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${MED3_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDWrapper MEDWrapperBase MEDWrapper_V2_1 MEDWrapper_V2_2)
+SET_TARGET_PROPERTIES(MEDWrapper PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(MEDWrapper MEDWrapper_V2_1 MEDWrapper_V2_2)
 INSTALL(TARGETS MEDWrapper DESTINATION ${MED_salomelib_LIBS})
 
 ADD_EXECUTABLE(mprint_version ${mprint_version_SOURCES})
-SET_TARGET_PROPERTIES(mprint_version PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${MED3_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(mprint_version MEDWrapper)
+SET_TARGET_PROPERTIES(mprint_version PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(mprint_version MEDWrapper MEDWrapper_V2_1 MEDWrapper_V2_2 MEDWrapperBase med_V2_1 ${BOOST_LIBS} ${MED3_LIBS_C_ONLY})
+
+ADD_EXECUTABLE(MED_Test ${mprint_version_SOURCES})
+SET_TARGET_PROPERTIES(MED_Test PROPERTIES COMPILE_FLAGS "${BOOST_DEFINITIONS} ${MED3_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(MED_Test MEDWrapper MEDWrapper_V2_1 MEDWrapper_V2_2 MEDWrapperBase med_V2_1 ${BOOST_LIBS})
 
 FILE(GLOB MEDWrapper_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${MEDWrapper_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL(TARGETS mprint_version DESTINATION ${MED_salomebin_BINS})
\ No newline at end of file
+INSTALL(TARGETS mprint_version MED_Test DESTINATION ${MED_salomebin_BINS})
index 5eeb3a971e1efbdcbd789afc4a06acdbfee6fd1d..aef8c90ba8807d161b474c018c000d77badaee38 100644 (file)
@@ -153,15 +153,15 @@ SET(test1_V2_1_SOURCES
   )
 
 ADD_LIBRARY(med_V2_1 SHARED ${med_V2_1_SOURCES})
-SET_TARGET_PROPERTIES(med_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS}")
+SET_TARGET_PROPERTIES(med_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(med_V2_1 ${HDF5_LIBS})
 INSTALL(TARGETS med_V2_1 DESTINATION ${MED_salomelib_LIBS})
 
 ADD_EXECUTABLE(mdump_V2_1 ${mdump_V2_1_SOURCES})
-SET_TARGET_PROPERTIES(mdump_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS}")
+SET_TARGET_PROPERTIES(mdump_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(mdump_V2_1 med_V2_1)
 ADD_EXECUTABLE(test1_V2_1 ${mdump_V2_1_SOURCES})
-SET_TARGET_PROPERTIES(test1_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS}")
+SET_TARGET_PROPERTIES(test1_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(test1_V2_1 med_V2_1)
 INSTALL(TARGETS mdump_V2_1 test1_V2_1 DESTINATION ${MED_salomebin_BINS})
 
index 59bc36fb935977de953c1b6c30abeaf9e9a216bd..ca0fc0505ad52431e54ef47d13d17dfea14e470b 100644 (file)
@@ -27,7 +27,7 @@ INCLUDE_DIRECTORIES(
 IF(MED_ENABLE_KERNEL)
   INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome)
 ELSE(MED_ENABLE_KERNEL)
-  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/adm_local_without_kernel/unix)
+  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/adm_local_without_kernel)
 ENDIF(MED_ENABLE_KERNEL)  
 
 SET(MEDWrapper_V2_1_SOURCES
@@ -35,8 +35,8 @@ SET(MEDWrapper_V2_1_SOURCES
   )
 
 ADD_LIBRARY(MEDWrapper_V2_1 SHARED ${MEDWrapper_V2_1_SOURCES})
-SET_TARGET_PROPERTIES(MEDWrapper_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${BOOST_DEFINITIONS} ${HDF5_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDWrapper_V2_1 med_V2_1 MEDWrapperBase)
+SET_TARGET_PROPERTIES(MEDWrapper_V2_1 PROPERTIES COMPILE_FLAGS "-D${MACHINE} ${BOOST_DEFINITIONS} ${HDF5_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(MEDWrapper_V2_1 med_V2_1 MEDWrapperBase ${PLATFORM_LIBS})
 INSTALL(TARGETS MEDWrapper_V2_1 DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB med_V2_1_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 61681f5d08561a797c261844f20d777f0be41dd4..351584b2d467cb558f88ff356b1830adfe48d005 100644 (file)
@@ -31,11 +31,11 @@ SET(MEDWrapper_V2_2_SOURCES
 IF(MED_ENABLE_KERNEL)
   INCLUDE_DIRECTORIES(${KERNEL_ROOT_DIR}/include/salome)
 ELSE(MED_ENABLE_KERNEL)
-  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/adm_local_without_kernel/unix)
+  INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/adm_local_without_kernel)
 ENDIF(MED_ENABLE_KERNEL)
 
 ADD_LIBRARY(MEDWrapper_V2_2 SHARED ${MEDWrapper_V2_2_SOURCES})
-SET_TARGET_PROPERTIES(MEDWrapper_V2_2 PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS}")
+SET_TARGET_PROPERTIES(MEDWrapper_V2_2 PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 TARGET_LINK_LIBRARIES(MEDWrapper_V2_2 MEDWrapperBase ${MED3_LIBS_C_ONLY} ${HDF5_LIBS})
 INSTALL(TARGETS MEDWrapper_V2_2 DESTINATION ${MED_salomelib_LIBS})
 
index cdd2ac2a3441335c677a0dd372058b070a5a9199..e9834f105fe4fb21f6a0346f7bfb009949463688 100644 (file)
@@ -17,4 +17,4 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INSTALL(FILES MED_shared_modules.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL(FILES MED_shared_modules.py DESTINATION ${MED_sharedpkgpython_PYTHON})
index b8310d8c7f8b0eafde37d12773783912cfe27728..34d1bae4e1e91be0b83cc39eb97ffad2358557ab 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
@@ -55,13 +56,17 @@ SET(MEDClientcmodule_SOURCES
 
 ADD_LIBRARY(MEDClientcmodule SHARED ${MEDClientcmodule_SOURCES})
 INSTALL(FILES libMEDClient.i DESTINATION ${MED_salomeinclude_HEADERS})
-SET_TARGET_PROPERTIES(MEDClientcmodule PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(MEDClientcmodule MEDMEMImpl MEDEngine)
+SET_TARGET_PROPERTIES(MEDClientcmodule PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+TARGET_LINK_LIBRARIES(MEDClientcmodule MEDMEMImpl MEDEngine ${PTHREAD_LIBS})
 INSTALL(TARGETS MEDClientcmodule DESTINATION ${MED_salomelib_LIBS})
 
 SWIG_ADD_MODULE(libMEDClient python libMEDClient.i)
-SWIG_LINK_LIBRARIES(libMEDClient ${PYTHON_LIBRARIES} MEDClientcmodule)
-SET_TARGET_PROPERTIES(_libMEDClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(libMEDClient ${PYTHON_LIBS} MEDClientcmodule)
+SET_TARGET_PROPERTIES(_libMEDClient PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_libMEDClient PROPERTIES DEBUG_OUTPUT_NAME _libMEDClient_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
 INSTALL(TARGETS _libMEDClient DESTINATION ${MED_salomepythondir})
 INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/libMEDClient.py ${MED_salomescript_PYTHON})
 
index 9bb5cc1eafa43b266794fd38b361533e4d5a731b..4c6db9583bf95d9505718f66532086b991b55514 100644 (file)
 
 ADD_SUBDIRECTORY(csh)
 
-SET(MedClientTestsConfig runTestMedCorba runContainer)
+SET(MedClientTestsConfig 
+#  runTestMedCorba 
+  runContainer
+)
 
 FOREACH(MedClientTestConfig ${MedClientTestsConfig})
   SET(input ${CMAKE_CURRENT_SOURCE_DIR}/${MedClientTestConfig}.in)
index d352ef916f34b31998a772bc87615c148b8c644c..85544b4f9f8a470e0b649bdbbb4891b7f961202a 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
@@ -45,8 +46,13 @@ SET_SOURCE_FILES_PROPERTIES(libCompo2.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(libCompo2.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 
 SWIG_ADD_MODULE(libCompo2 python libCompo2.i Compo2.cxx)
-SWIG_LINK_LIBRARIES(libCompo2 ${PYTHON_LIBRARIES} MEDClientcmodule)
-SET_TARGET_PROPERTIES(_libCompo2 PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(libCompo2 ${PYTHON_LIBS} MEDClientcmodule)
+SET_TARGET_PROPERTIES(_libCompo2 PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
+
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_libCompo2 PROPERTIES DEBUG_OUTPUT_NAME _libCompo2_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
+
 INSTALL(TARGETS _libCompo2 DESTINATION ${MED_salomepythondir})
 INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/libCompo2.py ${MED_salomescript_PYTHON})
 
index 02cd9f0844e7fe6c8cd85afce16e7c93e1dd00d7..2e0500839fbad102b1103075562cfdcebf995334 100644 (file)
@@ -25,6 +25,7 @@ SET_SOURCE_FILES_PROPERTIES(libMedCorba_Swig.i PROPERTIES SWIG_DEFINITIONS "-sha
 
 INCLUDE_DIRECTORIES(
   ${PYTHON_INCLUDE_DIRS}
+  ${PTHREAD_INCLUDE_DIRS}
   ${OMNIORB_INCLUDE_DIRS}
   ${MED3_INCLUDE_DIRS}
   ${HDF5_INCLUDE_DIRS}
@@ -41,13 +42,16 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(libMedCorba_Swig python libMedCorba_Swig.i)
-SWIG_LINK_LIBRARIES(libMedCorba_Swig ${PYTHON_LIBRARIES} MEDMEMImpl MEDEngine)
-SET_TARGET_PROPERTIES(_libMedCorba_Swig PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS}")
+SWIG_LINK_LIBRARIES(libMedCorba_Swig ${PYTHON_LIBS} MEDMEMImpl MEDEngine ${PLATFORM_LIBS})
+SET_TARGET_PROPERTIES(_libMedCorba_Swig PROPERTIES COMPILE_FLAGS "${OMNIORB_DEFINITIONS} ${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 
 SET(MED_MedCorba_Swig_salomescript_DATA
   medcorba_test.py batchmode_medcorba_test.py batchmode_medcorba_test1.py
   )
 
+IF(${MACHINE} STREQUAL WINDOWS)
+  SET_TARGET_PROPERTIES(_libMedCorba_Swig PROPERTIES DEBUG_OUTPUT_NAME _libMedCorba_Swig_d)
+ENDIF(${MACHINE} STREQUAL WINDOWS)
 INSTALL(TARGETS _libMedCorba_Swig DESTINATION ${MED_salomepythondir})
 INSTALL(FILES libMedCorba_Swig.i DESTINATION ${MED_salomeinclude_HEADERS})
 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libMedCorba_Swig.py DESTINATION ${MED_salomescript_PYTHON})
index 29ecc3e46e2c282fe9889f714f38e0d5178a8a0f..d51e9ecc16a6b729f08c76a107bc86004c2d8fa1 100644 (file)
@@ -36,7 +36,7 @@ SET(paramedloader_SOURCES
 
 ADD_LIBRARY(paramedloader SHARED ${paramedloader_SOURCES})
 SET_TARGET_PROPERTIES(paramedloader PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS}")
-TARGET_LINK_LIBRARIES(paramedloader paramedmem medloader)
+TARGET_LINK_LIBRARIES(paramedloader paramedmem medloader ${PLATFORM_LIBS})
 INSTALL(TARGETS paramedloader DESTINATION ${MED_salomelib_LIBS})
 
 FILE(GLOB paramedloader_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index c02e286ec05d689eeb10eb02a3da287555ed27cd..2f26862c726425fa63326580d3081c767f689605 100644 (file)
@@ -111,3 +111,13 @@ FOREACH(bintestparamem ${TESTSParaMEDMEM})
 ENDFOREACH(bintestparamem ${TESTSParaMEDMEM})
 
 INSTALL(TARGETS ${TESTSParaMEDMEM} DESTINATION ${MED_salomebin_BINS})
+SET(COMMON_HEADERS_HXX
+  MPIMainTest.hxx
+  MPIAccessDECTest.hxx
+  MPIAccessTest.hxx
+  ParaMEDMEMTest.hxx
+  MPI2Connector.hxx
+)
+INSTALL(FILES ${COMMON_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
+
+                                       
\ No newline at end of file
index 829d35274ab9f868c326f3bf503c83a2520401c6..c8e8f7a0f0d0163c9a0f5240364909f896962fa5 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
+INCLUDE(${SALOME_MACROS_DIR}/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
@@ -40,11 +40,12 @@ INCLUDE_DIRECTORIES(
   )
 
 SWIG_ADD_MODULE(ParaMEDMEM python ParaMEDMEM.i)
-SWIG_LINK_LIBRARIES(ParaMEDMEM ${PYTHON_LIBRARIES} paramedmem medloader)
+SWIG_LINK_LIBRARIES(ParaMEDMEM ${PYTHON_LIBS} paramedmem medloader)
 
 SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_DEFINITIONS "-shadow")
 
 INSTALL(TARGETS _ParaMEDMEM DESTINATION ${MED_salomepythondir})
 INSTALL(FILES ParaMEDMEM.i DESTINATION ${MED_salomeinclude_HEADERS})
-INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MED_salomepythondir})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py test_InterpKernelDEC.py test_NonCoincidentDEC.py test_StructuredCoincidentDEC.py DESTINATION ${MED_salomescript_PYTHON})
\ No newline at end of file
index 66b984c794323352c59bb89925ea6462a3f96f50..ebbc033e28876ea8757b1be842dacfe99ab950d7 100644 (file)
@@ -46,7 +46,7 @@ SET(renumber_SOURCES
   )
 
 SET(renumbercpp_LDFLAGS medmem)
-SET(renumber_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS}")
+SET(renumber_DEFINITIONS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${BOOST_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
 
 IF(MED_ENABLE_METIS)
   SET(renumbercpp_SOURCES ${renumbercpp_SOURCES} RENUMBER_METISRenumbering.cxx)
index e3c74701c22d113b80ef8473f90f7c35e98a8fe6..2c76be652a22c98e9a477c0a4b5c5d8feb0deae6 100755 (executable)
@@ -22,7 +22,7 @@
 
 //export symbols
 #ifdef WIN32
-# if defined RENUMBER_EXPORTS || defined renumber_EXPORTS
+# if defined RENUMBERCPP_EXPORTS || defined renumbercpp_EXPORTS
 #  define RENUMBER_EXPORT __declspec(dllexport)
 # else
 #  define RENUMBER_EXPORT __declspec(dllimport)