From 46d07623c5653b8112258218a24214291f9f883e Mon Sep 17 00:00:00 2001 From: ageay Date: Thu, 22 Mar 2012 13:36:57 +0000 Subject: [PATCH] MED CMakization --- src/MEDMEM/CMakeLists.txt | 81 +++++++++++++++++++ src/MEDMEMCppTest/CMakeLists.txt | 128 +++++++++++++++++++++++++++++++ 2 files changed, 209 insertions(+) create mode 100644 src/MEDMEM/CMakeLists.txt create mode 100644 src/MEDMEMCppTest/CMakeLists.txt diff --git a/src/MEDMEM/CMakeLists.txt b/src/MEDMEM/CMakeLists.txt new file mode 100644 index 000000000..0624f8425 --- /dev/null +++ b/src/MEDMEM/CMakeLists.txt @@ -0,0 +1,81 @@ +# Copyright (C) 2007-2011 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE_DIRECTORIES( + ${MED3_INCLUDES_DIR} + ${HDF5_INCLUDES_DIR} + ${XDR_INCLUDES_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Geometric2D + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/ExprEval + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints + ) + +SET(medmem_SOURCES + MEDMEM_Init.cxx + MEDMEM_RCBase.cxx + MEDMEM_CellModel.cxx + MEDMEM_Connectivity.cxx + MEDMEM_Coordinate.cxx + MEDMEM_DriversDef.cxx + MEDMEM_DriverFactory.cxx + MEDMEM_Family.cxx + MEDMEM_Field.cxx + MEDMEM_GenDriver.cxx + MEDMEM_Group.cxx + MEDMEM_Exception.cxx + MEDMEM_MedMeshDriver.cxx + MEDMEM_GibiMeshDriver.cxx + MEDMEM_PorflowMeshDriver.cxx + MEDMEM_SkyLineArray.cxx + MEDMEM_Mesh.cxx + MEDMEM_Meshing.cxx + MEDMEM_Support.cxx + MEDMEM_Unit.cxx + MEDMEM_VtkMedDriver.cxx + MEDMEM_VtkMeshDriver.cxx + MEDMEM_Grid.cxx + MEDMEM_MedVersion.cxx + MEDMEM_TopLevel.cxx + MEDMEM_ConnectZone.cxx + MEDMEM_EnsightMedDriver.cxx + MEDMEM_EnsightFieldDriver.cxx + MEDMEM_EnsightUtils.cxx + MEDMEM_EnsightMeshDriver.cxx + MEDMEM_DriverTools.cxx + MEDMEM_GaussLocalization.cxx + MEDMEM_Extractor.cxx + PointLocator.cxx + MEDMEM_Remapper.cxx + MEDMEM_GMesh.cxx + MEDMEM_MeshFuse.cxx + MEDMEM_MedFileBrowser.cxx + ) + +ADD_LIBRARY(medmem SHARED ${medmem_SOURCES}) +SET_TARGET_PROPERTIES(medmem PROPERTIES COMPILE_FLAGS "${HDF5_FLAGS} ${MED3_FLAGS} ${XDR_FLAGS}") +TARGET_LINK_LIBRARIES(medmem interpkernel ${MED3_LIBS_C_ONLY} ${HDF5_LIBS} ${XDR_LIBS}) +INSTALL(TARGETS medmem DESTINATION ${MED_salomelib_LIBS}) + +FILE(GLOB medmem_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx") +INSTALL(FILES ${medmem_HEADERS_HXX} DESTINATION ${MED_salomeinclude_HEADERS}) +FILE(GLOB medmem_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx") +INSTALL(FILES ${medmem_HEADERS_TXX} DESTINATION ${MED_salomeinclude_HEADERS}) diff --git a/src/MEDMEMCppTest/CMakeLists.txt b/src/MEDMEMCppTest/CMakeLists.txt new file mode 100644 index 000000000..d1690ca5d --- /dev/null +++ b/src/MEDMEMCppTest/CMakeLists.txt @@ -0,0 +1,128 @@ +# Copyright (C) 2007-2011 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +INCLUDE_DIRECTORIES( + ${MED3_INCLUDES_DIR} + ${HDF5_INCLUDES_DIR} + ${XDR_INCLUDES_DIR} + ${CPPUNIT_INCLUDES_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/../MEDMEM + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases + ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints + ) + +SET(MEDMEMCppTest_SOURCES + MEDMEMTest.cxx + MEDMEMTest_Array.cxx + MEDMEMTest_AsciiFieldDriver.cxx + MEDMEMTest_Connectivity.cxx + MEDMEMTest_Coordinate.cxx + MEDMEMTest_DesactivateFacesComputation.cxx + MEDMEMTest_GetVolumeAbs.cxx + MEDMEMTest_DriverFactory.cxx + MEDMEMTest_Exception.cxx + MEDMEMTest_Extractor.cxx + MEDMEMTest_Family.cxx + MEDMEMTest_Field.cxx + MEDMEMTest_Formulae.cxx + MEDMEMTest_GaussLocalization.cxx + MEDMEMTest_GibiMeshDriver.cxx + MEDMEMTest_Grid.cxx + MEDMEMTest_Group.cxx + MEDMEMTest_MedFileBrowser.cxx + MEDMEMTest_MedFieldDriver.cxx + MEDMEMTest_MedMeshDriver.cxx + MEDMEMTest_MedVersion.cxx + MEDMEMTest_MeshAndMeshing.cxx + MEDMEMTest_ModulusArray.cxx + MEDMEMTest_PartialDescendingConnectivity.cxx + MEDMEMTest_PointerOf.cxx + MEDMEMTest_PorflowMeshDriver.cxx + MEDMEMTest_Remapper.cxx + MEDMEMTest_SkyLineArray.cxx + MEDMEMTest_Support.cxx + MEDMEMTest_TopLevel.cxx + MEDMEMTest_Unit.cxx + MEDMEMTest_VtkFieldDriver.cxx + MEDMEMTest_VtkMedDriver.cxx + MEDMEMTest_VtkMeshDriver.cxx + MEDMEMTest_nArray.cxx + MEDMEMTest_Utils.hxx + MEDMEMTest_Utils.cxx + MEDMEMTest_MeshFuse.cxx + ) + +SET(TestMEDMEM_SOURCES + TestMEDMEM.cxx + ) + +SET(MEDMEMTest_Array_fault_SOURCES + MEDMEMTest_Array_fault.cxx + ) + +SET(MEDMEMTest_Connectivity_fault_SOURCES + MEDMEMTest_Connectivity_fault.cxx + ) + +SET(MEDMEMTest_Coordinate_fault_SOURCES + MEDMEMTest_Coordinate_fault.cxx + ) + +SET(MEDMEMTest_Family_fault_SOURCES + MEDMEMTest_Family_fault.cxx + ) + +SET(MEDMEMTest_Field_fault_SOURCES + MEDMEMTest_Field_fault.cxx + ) + +SET(MEDMEMTest_Grid_fault_SOURCES + MEDMEMTest_Grid_fault.cxx + ) + +SET(MEDMEMTest_MeshAndMeshing_fault_SOURCES + MEDMEMTest_MeshAndMeshing_fault.cxx + ) + +SET(MEDMEMTest_Support_fault_SOURCES + MEDMEMTest_Support_fault.cxx + ) + +SET(MEDMEMTest_VtkFieldDriver_fault_SOURCES + MEDMEMTest_VtkFieldDriver_fault.cxx + ) + +SET(MEDMEMTest_VtkMeshDriver_fault_SOURCES + MEDMEMTest_VtkMeshDriver_fault.cxx + ) + +ADD_LIBRARY(MEDMEMCppTest SHARED ${MEDMEMCppTest_SOURCES}) +SET_TARGET_PROPERTIES(MEDMEMCppTest PROPERTIES COMPILE_FLAGS "${HDF5_FLAGS} ${MED3_FLAGS} ${XDR_FLAGS} ${CPPUNIT_FLAGS}") +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_FLAGS} ${MED3_FLAGS} ${XDR_FLAGS}") + TARGET_LINK_LIBRARIES(${MEDMEMCPP_TEST} MEDMEMCppTest) +ENDFOREACH(MEDMEMCPP_TEST ${ALLMEDMEMCPP_TESTS}) + +INSTALL(TARGETS MEDMEMCppTest DESTINATION ${MED_salomelib_LIBS}) +INSTALL(TARGETS ${ALLMEDMEMCPP_TESTS} DESTINATION ${MED_salomebin_BINS}) -- 2.39.2