Salome HOME
Copyright update 2020
[tools/medcoupling.git] / src / MEDCoupling / CMakeLists.txt
1 # Copyright (C) 2012-2020  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, or (at your option) any later version.
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 # Author : Anthony Geay (CEA/DEN)
20
21 IF(MEDCOUPLING_BUILD_TESTS)
22   ADD_SUBDIRECTORY(Test)
23 ENDIF(MEDCOUPLING_BUILD_TESTS)
24
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)
27
28 IF (NOT DEFINED MSVC)
29   ADD_DEFINITIONS(-Wsign-compare -Wconversion)
30 ENDIF()
31
32 INCLUDE_DIRECTORIES(
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   )
41
42 SET(medcoupling_SOURCES
43   MEDCouplingField.cxx
44   MEDCouplingFieldFloat.cxx
45   MEDCouplingFieldDouble.cxx
46   MEDCouplingFieldInt.cxx
47   MEDCouplingUMesh.cxx
48   MEDCouplingUMesh_internal.cxx
49   MEDCouplingUMesh_intersection.cxx
50   MEDCoupling1GTUMesh.cxx
51   MEDCouplingMemArray.cxx
52   MEDCouplingMemArrayFloat.cxx
53   MEDCouplingMemArrayChar.cxx
54   MEDCouplingMap.cxx
55   MEDCouplingTraits.cxx
56   MEDCouplingTimeLabel.cxx
57   MEDCouplingCMesh.cxx
58   MEDCouplingIMesh.cxx
59   MEDCouplingCurveLinearMesh.cxx
60   MEDCouplingStructuredMesh.cxx
61   MEDCouplingTimeDiscretization.cxx
62   MEDCouplingFieldDiscretization.cxx
63   MEDCouplingRefCountObject.cxx
64   MEDCouplingPointSet.cxx
65   MEDCouplingFieldTemplate.cxx
66   MEDCouplingMappedExtrudedMesh.cxx
67   MEDCouplingMesh.cxx
68   MEDCouplingGaussLocalization.cxx
69   MEDCouplingNatureOfField.cxx
70   MEDCouplingMultiFields.cxx
71   MEDCouplingDefinitionTime.cxx
72   MEDCouplingFieldOverTime.cxx
73   MEDCouplingCartesianAMRMesh.cxx
74   MEDCouplingAMRAttribute.cxx
75   MEDCouplingMatrix.cxx
76   MEDCouplingPartDefinition.cxx
77   MEDCouplingSkyLineArray.cxx
78   MEDCouplingVoronoi.cxx
79   ../ICoCo/ICoCoField.cxx
80   ../ICoCo/ICoCoMEDField.cxx
81   )
82
83 SET(medcouplingremapper_SOURCES
84   MEDCouplingRemapper.cxx
85   )
86
87 ADD_LIBRARY(medcouplingcpp ${medcoupling_SOURCES})
88 SET_TARGET_PROPERTIES(medcouplingcpp PROPERTIES OUTPUT_NAME "medcoupling")
89 TARGET_LINK_LIBRARIES(medcouplingcpp interpkernel)
90 INSTALL(TARGETS medcouplingcpp EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
91
92 ADD_LIBRARY(medcouplingremapper ${medcouplingremapper_SOURCES})
93 TARGET_LINK_LIBRARIES(medcouplingremapper medcouplingcpp)
94 INSTALL(TARGETS medcouplingremapper EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
95
96 FILE(GLOB medcoupling_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
97 FILE(GLOB medcoupling_HEADERS_TXX "${CMAKE_CURRENT_SOURCE_DIR}/*.txx")
98 FILE(GLOB icoco_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/../ICoCo/*.hxx")
99 INSTALL(FILES ${medcoupling_HEADERS_HXX} ${medcoupling_HEADERS_TXX} ${icoco_HEADERS_HXX} MEDCouplingNatureOfFieldEnum DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
100
101 # To allow usage as SWIG dependencies:
102 SET(medcoupling_HEADERS_HXX PARENT_SCOPE)
103 SET(medcoupling_HEADERS_TXX PARENT_SCOPE)