]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
MED CMakization
authorageay <ageay>
Mon, 2 Apr 2012 13:35:04 +0000 (13:35 +0000)
committerageay <ageay>
Mon, 2 Apr 2012 13:35:04 +0000 (13:35 +0000)
src/MEDCalculator/Swig/CMakeLists.txt
src/MEDCouplingCorba_Swig/CMakeLists.txt
src/MEDCouplingCorba_Swig/Client/CMakeLists.txt
src/MEDCoupling_Swig/CMakeLists.txt
src/MEDLoader/Swig/CMakeLists.txt
src/MEDSPLITTER_Swig/CMakeLists.txt
src/MedClient/src/CMakeLists.txt
src/MedClient/test/test2/CMakeLists.txt
src/ParaMEDMEM_Swig/CMakeLists.txt

index f53e94bb4306186ec3cc31e5b659b55baefe8522..d84a7004050d30a2ca93e0455796574c3f1e9393 100644 (file)
@@ -17,6 +17,7 @@
 # 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})
 
@@ -52,4 +53,4 @@ SWIG_LINK_LIBRARIES(MEDCalculator ${PYTHON_LIBRARIES} medcalculator)
 FILE(GLOB medcalculatorspython_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${medcalculatorspython_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
 INSTALL(TARGETS _MEDCalculator DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCalculator.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/MEDCalculator.py ${MED_salomescript_PYTHON})
index 5bd21bb01ca029c865d4a75b3b8944b90e1a97e9..7c228591f5024b133984c53eed6b0f82106f5ad0 100644 (file)
@@ -19,6 +19,7 @@
 
 ADD_SUBDIRECTORY(Client)
 
+INCLUDE(${KERNEL_ROOT_DIR}/salome_adm/cmake_files/InstallAndCompilePythonFile.cmake)
 FIND_PACKAGE(SWIG REQUIRED)
 INCLUDE(${SWIG_USE_FILE})
 
@@ -43,4 +44,5 @@ SWIG_LINK_LIBRARIES(MEDCouplingCorba ${PYTHON_LIBRARIES} medcouplingcorba)
 SET_TARGET_PROPERTIES(_MEDCouplingCorba PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS}")
 
 INSTALL(TARGETS _MEDCouplingCorba DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingCorba.py DESTINATION ${MED_salomescript_PYTHON})
+SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingCorba.py)
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
index ed7625db12162e2883463f5121b788e54099c8d1..e9ea3ad623b0c233fb4311abeb752ae04fd5ce8b 100644 (file)
@@ -17,6 +17,7 @@
 # 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,4 +42,5 @@ SWIG_LINK_LIBRARIES(MEDCouplingClient ${PYTHON_LIBRARIES} medcouplingclient)
 SET_TARGET_PROPERTIES(_MEDCouplingClient PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS}")
 
 INSTALL(TARGETS _MEDCouplingClient DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingClient.py DESTINATION ${MED_salomescript_PYTHON})
+SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingClient.py)
+INSTALL_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
index 68d930f61e572ab08215cc183e96abf0800bb9a9..7c2d405dbeb405fc8316fbd08d95631e3e27f371 100644 (file)
@@ -46,7 +46,7 @@ SET_SOURCE_FILES_PROPERTIES(MEDCouplingRemapper.i PROPERTIES SWIG_FLAGS "-shadow
 SWIG_ADD_MODULE(MEDCouplingRemapper python MEDCouplingRemapper.i)
 SWIG_LINK_LIBRARIES(MEDCouplingRemapper ${PYTHON_LIBRARIES} medcouplingremapper)
 
-SET(PYFILES_TO_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/MEDCoupling.py ${CMAKE_CURRENT_BINARY_DIR}/MEDCouplingRemapper.py)
+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_AND_COMPILE_PYTHON_FILE("${PYFILES_TO_INSTALL}" ${MED_salomescript_PYTHON})
 
index ab9ce5673ff5eeda8ca297609e4d0d9ffba24082..f964f784f857a0a260189584d8fc6b60797da802 100644 (file)
@@ -17,6 +17,8 @@
 # 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})
 
@@ -47,7 +49,8 @@ INCLUDE_DIRECTORIES(
   )
 
 INSTALL(TARGETS _MEDLoader DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/MEDLoader.py DESTINATION ${MED_salomescript_PYTHON})
+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})
 
 ADD_TEST(MEDLoaderTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest.py)
 ADD_TEST(MEDLoaderTest2 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDLoaderTest2.py)
index 11e5fa9e9a201f28ab2609fad66e9c6535a1ec6b..1d7c5da963044f58b7af2b083c443c9e109b3b25 100644 (file)
@@ -17,6 +17,7 @@
 # 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})
 
@@ -43,3 +44,5 @@ SWIG_LINK_LIBRARIES(libMEDSPLITTER_Swig ${PYTHON_LIBRARIES} medsplittercpp)
 
 INSTALL(TARGETS _libMEDSPLITTER_Swig DESTINATION ${MED_salomepythondir})
 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})
+
index 35521bf1246edbe5cbf81e771e9a9093297af973..42cf612eee4c173b9f266ec914c8bcf73ea66b29 100644 (file)
@@ -17,6 +17,7 @@
 # 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})
 
@@ -61,7 +62,7 @@ SWIG_ADD_MODULE(libMEDClient python libMEDClient.i)
 SWIG_LINK_LIBRARIES(libMEDClient ${PYTHON_LIBRARIES} MEDClientcmodule)
 SET_TARGET_PROPERTIES(_libMEDClient PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS} ${HDF5_FLAGS} ${MED3_FLAGS} ${XDR_FLAGS}")
 INSTALL(TARGETS _libMEDClient DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libMEDClient.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/libMEDClient.py ${MED_salomescript_PYTHON})
 
 FILE(GLOB libMEDClient_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${libMEDClient_HEADERS_HXX} FIELDClient.cxx DESTINATION ${MED_salomeinclude_HEADERS})
index db2f6734d0aac00eb755557b449bb96c8c712a20..fef9b76b1a95dcefc482b19e6f15cdc82da54d1a 100644 (file)
@@ -17,6 +17,7 @@
 # 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})
 
@@ -47,7 +48,7 @@ SWIG_ADD_MODULE(libCompo2 python libCompo2.i Compo2.cxx)
 SWIG_LINK_LIBRARIES(libCompo2 ${PYTHON_LIBRARIES} MEDClientcmodule)
 SET_TARGET_PROPERTIES(_libCompo2 PROPERTIES COMPILE_FLAGS "${OMNIORB_FLAGS} ${HDF5_FLAGS} ${MED3_FLAGS} ${XDR_FLAGS}")
 INSTALL(TARGETS _libCompo2 DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libCompo2.py DESTINATION ${MED_salomescript_PYTHON})
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/libCompo2.py ${MED_salomescript_PYTHON})
 
 FILE(GLOB libCompo2_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
 INSTALL(FILES ${libCompo2_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS})
index b1d1c390b6a7a691444742c352c4d4814bbedc08..59732550345f693be1a01b20a4215e055a7438c9 100644 (file)
@@ -17,6 +17,7 @@
 # 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})
 
@@ -45,7 +46,4 @@ SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES CPLUSPLUS ON)
 SET_SOURCE_FILES_PROPERTIES(ParaMEDMEM.i PROPERTIES SWIG_FLAGS "-shadow")
 
 INSTALL(TARGETS _ParaMEDMEM DESTINATION ${MED_salomepythondir})
-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py DESTINATION ${MED_salomescript_PYTHON})
-
-ADD_TEST(MEDCouplingBasicsTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingBasicsTest.py)
-ADD_TEST(MEDCouplingRemapperTest ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/MEDCouplingRemapperTest.py)
+INSTALL_AND_COMPILE_PYTHON_FILE(${CMAKE_CURRENT_BINARY_DIR}/ParaMEDMEM.py ${MED_salomescript_PYTHON})