Salome HOME
56e3fb4c9eba57fd6a1d2865cbf7135c99793dc9
[modules/med.git] / src / MEDMEMCppTest / CMakeLists.txt
1 # Copyright (C) 2012-2013  CEA/DEN, EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 INCLUDE_DIRECTORIES(
21   ${MED3_INCLUDE_DIRS}
22   ${HDF5_INCLUDE_DIRS}
23   ${XDR_INCLUDE_DIRS}
24   ${CPPUNIT_INCLUDE_DIRS}
25   ${CMAKE_CURRENT_SOURCE_DIR}/../MEDMEM
26   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
27   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
28   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints
29   ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Geometric2D
30   )
31
32 SET(MEDMEMCppTest_SOURCES
33   MEDMEMTest.cxx
34   MEDMEMTest_Array.cxx
35   MEDMEMTest_AsciiFieldDriver.cxx
36   MEDMEMTest_Connectivity.cxx
37   MEDMEMTest_Coordinate.cxx
38   MEDMEMTest_DesactivateFacesComputation.cxx
39   MEDMEMTest_GetVolumeAbs.cxx
40   MEDMEMTest_DriverFactory.cxx
41   MEDMEMTest_Exception.cxx
42   MEDMEMTest_Extractor.cxx
43   MEDMEMTest_Family.cxx
44   MEDMEMTest_Field.cxx
45   MEDMEMTest_Formulae.cxx
46   MEDMEMTest_GaussLocalization.cxx
47   MEDMEMTest_GibiMeshDriver.cxx
48   MEDMEMTest_Grid.cxx
49   MEDMEMTest_Group.cxx
50   MEDMEMTest_MedFileBrowser.cxx
51   MEDMEMTest_MedFieldDriver.cxx
52   MEDMEMTest_MedMeshDriver.cxx
53   MEDMEMTest_MedVersion.cxx
54   MEDMEMTest_MeshAndMeshing.cxx
55   MEDMEMTest_ModulusArray.cxx
56   MEDMEMTest_PartialDescendingConnectivity.cxx
57   MEDMEMTest_PointerOf.cxx
58   MEDMEMTest_PorflowMeshDriver.cxx
59   MEDMEMTest_Remapper.cxx
60   MEDMEMTest_SkyLineArray.cxx
61   MEDMEMTest_Support.cxx
62   MEDMEMTest_TopLevel.cxx
63   MEDMEMTest_Unit.cxx
64   MEDMEMTest_VtkFieldDriver.cxx
65   MEDMEMTest_VtkMedDriver.cxx
66   MEDMEMTest_VtkMeshDriver.cxx
67   MEDMEMTest_nArray.cxx
68   MEDMEMTest_Utils.hxx
69   MEDMEMTest_Utils.cxx
70   MEDMEMTest_MeshFuse.cxx
71   )
72
73 SET(TestMEDMEM_SOURCES
74   TestMEDMEM.cxx
75   )
76
77 SET(MEDMEMTest_Array_fault_SOURCES
78   MEDMEMTest_Array_fault.cxx
79   )
80
81 SET(MEDMEMTest_Connectivity_fault_SOURCES
82   MEDMEMTest_Connectivity_fault.cxx
83   )
84
85 SET(MEDMEMTest_Coordinate_fault_SOURCES
86   MEDMEMTest_Coordinate_fault.cxx
87   )
88
89 SET(MEDMEMTest_Family_fault_SOURCES
90   MEDMEMTest_Family_fault.cxx
91   )
92
93 SET(MEDMEMTest_Field_fault_SOURCES
94   MEDMEMTest_Field_fault.cxx
95   )
96
97 SET(MEDMEMTest_Grid_fault_SOURCES
98   MEDMEMTest_Grid_fault.cxx
99   )
100
101 SET(MEDMEMTest_MeshAndMeshing_fault_SOURCES
102   MEDMEMTest_MeshAndMeshing_fault.cxx
103   )
104
105 SET(MEDMEMTest_Support_fault_SOURCES
106   MEDMEMTest_Support_fault.cxx
107   )
108
109 SET(MEDMEMTest_VtkFieldDriver_fault_SOURCES
110   MEDMEMTest_VtkFieldDriver_fault.cxx
111   )
112
113 SET(MEDMEMTest_VtkMeshDriver_fault_SOURCES
114   MEDMEMTest_VtkMeshDriver_fault.cxx
115   )
116
117 ADD_LIBRARY(MEDMEMCppTest SHARED ${MEDMEMCppTest_SOURCES})
118 SET_TARGET_PROPERTIES(MEDMEMCppTest PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${CPPUNIT_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
119 TARGET_LINK_LIBRARIES(MEDMEMCppTest medmem ${CPPUNIT_LIBS})
120
121 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)
122 FOREACH(MEDMEMCPP_TEST ${ALLMEDMEMCPP_TESTS})
123   ADD_EXECUTABLE(${MEDMEMCPP_TEST} ${${MEDMEMCPP_TEST}_SOURCES})
124   SET_TARGET_PROPERTIES(${MEDMEMCPP_TEST} PROPERTIES COMPILE_FLAGS "${HDF5_DEFINITIONS} ${MED3_DEFINITIONS} ${XDR_DEFINITIONS} ${PLATFORM_DEFINITIONS}")
125   TARGET_LINK_LIBRARIES(${MEDMEMCPP_TEST} MEDMEMCppTest ${PLATFORM_LIBS})
126 ENDFOREACH(MEDMEMCPP_TEST ${ALLMEDMEMCPP_TESTS})
127
128 INSTALL(TARGETS MEDMEMCppTest DESTINATION ${MED_salomelib_LIBS})
129 INSTALL(TARGETS ${ALLMEDMEMCPP_TESTS} DESTINATION ${MED_salomebin_BINS})
130 INSTALL(FILES testMEDMEM.py DESTINATION ${MED_salomebin_BINS})
131 INSTALL(FILES MEDMEMTest.hxx MEDMEMCppTestExport.hxx DESTINATION ${MED_salomeinclude_HEADERS})