1 # Copyright (C) 2012-2021 CEA/DEN, EDF R&D
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, or (at your option) any later version.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 # Author : Anthony Geay (CEA/DEN)
21 IF(MEDCOUPLING_BUILD_TESTS)
22 ADD_SUBDIRECTORY(Test)
23 ENDIF(MEDCOUPLING_BUILD_TESTS)
25 ### KILLER WARNINGS TO HELP INT64 MANAGEMENT
26 #ADD_DEFINITIONS(-Wextra -Wsynth -Wno-unused-parameter -pedantic -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wreturn-type -Wno-endif-labels -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wredundant-decls -Wlong-long -Wdisabled-optimization -Wunknown-pragmas -Wundef -Wreorder)
29 ADD_DEFINITIONS(-Wsign-compare -Wconversion)
33 ${CMAKE_CURRENT_BINARY_DIR}/../..
34 ${CMAKE_CURRENT_SOURCE_DIR}
35 ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL
36 ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Bases
37 ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/Geometric2D
38 ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/ExprEval
39 ${CMAKE_CURRENT_SOURCE_DIR}/../INTERP_KERNEL/GaussPoints
40 ${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo
43 SET(medcoupling_SOURCES
45 MEDCouplingFieldFloat.cxx
46 MEDCouplingFieldDouble.cxx
47 MEDCouplingFieldInt32.cxx
48 MEDCouplingFieldInt64.cxx
50 MEDCouplingUMesh_internal.cxx
51 MEDCouplingUMesh_intersection.cxx
52 MEDCoupling1GTUMesh.cxx
53 MEDCouplingMemArray.cxx
54 MEDCouplingMemArrayFloat.cxx
55 MEDCouplingMemArrayChar.cxx
58 MEDCouplingTimeLabel.cxx
61 MEDCouplingCurveLinearMesh.cxx
62 MEDCouplingStructuredMesh.cxx
63 MEDCouplingTimeDiscretization.cxx
64 MEDCouplingFieldDiscretization.cxx
65 MEDCouplingRefCountObject.cxx
66 MEDCouplingPointSet.cxx
67 MEDCouplingFieldTemplate.cxx
68 MEDCouplingMappedExtrudedMesh.cxx
70 MEDCouplingGaussLocalization.cxx
71 MEDCouplingNatureOfField.cxx
72 MEDCouplingMultiFields.cxx
73 MEDCouplingDefinitionTime.cxx
74 MEDCouplingFieldOverTime.cxx
75 MEDCouplingCartesianAMRMesh.cxx
76 MEDCouplingAMRAttribute.cxx
78 MEDCouplingPartDefinition.cxx
79 MEDCouplingSkyLineArray.cxx
80 MEDCouplingVoronoi.cxx
81 ../ICoCo/ICoCoField.cpp # [ABN] Yes, .cpp, this is imposed by ICoCo.
82 ../ICoCo/ICoCoMEDDoubleField.cxx
83 ../ICoCo/ICoCoMEDIntField.cxx
86 SET(medcouplingremapper_SOURCES
87 MEDCouplingRemapper.cxx
90 ADD_LIBRARY(medcouplingcpp ${medcoupling_SOURCES})
91 SET_TARGET_PROPERTIES(medcouplingcpp PROPERTIES OUTPUT_NAME "medcoupling")
92 TARGET_LINK_LIBRARIES(medcouplingcpp interpkernel)
93 INSTALL(TARGETS medcouplingcpp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
95 ADD_LIBRARY(medcouplingremapper ${medcouplingremapper_SOURCES})
96 TARGET_LINK_LIBRARIES(medcouplingremapper medcouplingcpp)
97 INSTALL(TARGETS medcouplingremapper EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
99 FILE(GLOB medcoupling_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx"
100 "${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo/*.hxx"
101 "${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo/*.h")
102 FILE(GLOB medcoupling_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
103 FILE(GLOB icoco_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo/*.hxx")
104 INSTALL(FILES ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX} ${icoco_HEADERS_HXX} MEDCouplingNatureOfFieldEnum DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
106 # To allow usage as SWIG dependencies:
107 SET(medcoupling_HEADERS_HXX PARENT_SCOPE)
108 SET(medcoupling_HEADERS_TXX PARENT_SCOPE)