OPTION(MEDCOUPLING_ENABLE_PYTHON "Build PYTHON bindings." ON)
OPTION(MEDCOUPLING_ENABLE_PARTITIONER "Build MEDPartitioner." ON)
OPTION(MEDCOUPLING_ENABLE_RENUMBER "Build Renumber." ON)
+OPTION(MEDCOUPLING_ENABLE_SHAPERECOGN "Build ShapeRecogn" OFF)
OPTION(MEDCOUPLING_WITH_FILE_EXAMPLES "Install examples of files containing meshes and fields of different formats." ON)
OPTION(MEDCOUPLING_USE_MPI "(Use MPI containers) - For MED this triggers the build of ParaMEDMEM." OFF)
OPTION(MEDCOUPLING_BUILD_TESTS "Build MEDCoupling C++ tests." ON)
SALOME_LOG_OPTIONAL_PACKAGE(Boost MEDCOUPLING_ENABLE_RENUMBER)
ENDIF(MEDCOUPLING_ENABLE_RENUMBER)
+IF(MEDCOUPLING_ENABLE_SHAPERECOGN)
+ FIND_PACKAGE(BLAS REQUIRED)
+ FIND_PACKAGE(LAPACK REQUIRED)
+ FIND_LIBRARY(LAPACKE_LIB NAMES lapacke REQUIRED)
+ SET(LAPACK_LIBRARIES ${LAPACKE_LIB} ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ FIND_PATH(LAPACKE_INCLUDE_DIRS NAMES lapacke.h HINTS ${LAPACK_LIBRARIES})
+ IF(LAPACK_FOUND)
+ MESSAGE(STATUS "Lapacke libraries: ${LAPACK_LIBRARIES}")
+ MESSAGE(STATUS "Lapacke include dirs: ${LAPACKE_INCLUDE_DIRS}")
+ ELSE()
+ MESSAGE(FATAL_ERROR "Error in Lapacke detection ! lapacke not found !")
+ ENDIF(LAPACK_FOUND)
+ SALOME_LOG_OPTIONAL_PACKAGE(Lapack MEDCOUPLING_ENABLE_SHAPERECOGN)
+ENDIF(MEDCOUPLING_ENABLE_SHAPERECOGN)
+
IF(MEDCOUPLING_ENABLE_PYTHON)
FIND_PACKAGE(SalomePythonInterp)
FIND_PACKAGE(SalomePythonLibs)
ENDIF()
ENDIF()
ENDIF()
+
+IF(MEDCOUPLING_ENABLE_SHAPERECOGN)
+ LIST(APPEND _${PROJECT_NAME}_exposed_targets shaperecogn)
+ENDIF(MEDCOUPLING_ENABLE_SHAPERECOGN)
# Add all targets to the build-tree export set
ENDIF(MEDCOUPLING_BUILD_TESTS)
ENDIF(MEDCOUPLING_USE_MPI)
+IF(MEDCOUPLING_ENABLE_SHAPERECOGN)
+ ADD_SUBDIRECTORY(ShapeRecogn)
+ENDIF(MEDCOUPLING_ENABLE_SHAPERECOGN)
+
# Application tests
configure_file(CTestTestfileInstall.cmake.in "CTestTestfileST.cmake" @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CTestTestfileST.cmake DESTINATION ${MEDCOUPLING_INSTALL_TESTS} RENAME CTestTestfile.cmake)
--- /dev/null
+# Copyright (C) 2012-2024 CEA, EDF
+#
+# 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, or (at your option) any later version.
+#
+# 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
+#
+
+ADD_DEFINITIONS(${HDF5_DEFINITIONS} ${MEDFILE_DEFINITIONS})
+
+IF (NOT DEFINED MSVC)
+ ADD_DEFINITIONS(-Wsign-compare -Wconversion)
+ENDIF()
+
+# IF(MEDCOUPLING_ENABLE_PYTHON)
+# ADD_SUBDIRECTORY(Swig)
+# ENDIF(MEDCOUPLING_ENABLE_PYTHON)
+
+# IF(MEDCOUPLING_BUILD_TESTS)
+# ADD_SUBDIRECTORY(Test)
+# ENDIF(MEDCOUPLING_BUILD_TESTS)
+
+INCLUDE_DIRECTORIES(
+ ${MEDFILE_INCLUDE_DIRS}
+ ${HDF5_INCLUDE_DIRS}
+ ${LAPACKE_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
+ ${CMAKE_CURRENT_SOURCE_DIR}/../MEDLoader
+)
+
+SET(shaperecogn_SOURCES
+ )
+
+ADD_LIBRARY(shaperecogn ${shaperecogn_SOURCES})
+SET_TARGET_PROPERTIES(shaperecogn PROPERTIES COMPILE_FLAGS "")
+TARGET_LINK_LIBRARIES(shaperecogn medcouplingcpp ${MEDFILE_C_LIBRARIES} ${HDF5_LIBRARIES} ${LAPACK_LIBRARIES})
+INSTALL(TARGETS shaperecogn EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${MEDCOUPLING_INSTALL_LIBS})
+
+FILE(GLOB shaperecogn_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
+INSTALL(FILES ${shaperecogn_HEADERS_HXX} DESTINATION ${MEDCOUPLING_INSTALL_HEADERS})
+
+# To allow usage as SWIG dependencies:
+SET(shaperecogn_HEADERS_HXX PARENT_SCOPE)