From ef748791c049c6812636911bb61d91f2e460efab Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Thu, 29 Aug 2024 13:03:22 +0200 Subject: [PATCH] [EDF30834] : Declaration in medcoupling exts. WIP --- CMakeLists.txt | 2 +- src/CMakeLists.txt | 8 +++++--- src/PyWrapping/medcoupling.i | 6 +++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c36a9189..fff7065d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ OPTION(MEDCOUPLING_MICROMED "Build MED without MED file dependency." OFF) 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_ENABLE_SHAPERECOGN "Build Shape Recognition module." 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) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 98dc66ce5..3911381c8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -31,6 +31,11 @@ ENDIF(MEDCOUPLING_BUILD_TESTS) ADD_SUBDIRECTORY(MEDCoupling) ADD_SUBDIRECTORY(ICoCo) +IF(MEDCOUPLING_ENABLE_SHAPERECOGN) + ADD_SUBDIRECTORY(ShapeRecogn) + LIST(APPEND SWIG_MODULE_medcoupling_EXTRA_FLAGS -DWITH_SHAPE_RECOGN) +ENDIF(MEDCOUPLING_ENABLE_SHAPERECOGN) + IF(MEDCOUPLING_ENABLE_PYTHON) ADD_SUBDIRECTORY(MEDCoupling_Swig) ADD_SUBDIRECTORY(PyWrapping) @@ -75,9 +80,6 @@ IF(MEDCOUPLING_USE_MPI) 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) diff --git a/src/PyWrapping/medcoupling.i b/src/PyWrapping/medcoupling.i index 06c12759c..29e2a82c7 100644 --- a/src/PyWrapping/medcoupling.i +++ b/src/PyWrapping/medcoupling.i @@ -57,8 +57,9 @@ static const char RENUM_EXT[]="Renumberer"; static const char PART_EXT[]="Partitioner"; static const char PAR_INTERPOL_EXT[]="Parallel interpolator (SPMD paradigm)"; + static const char SHAPE_RECOGNITION_EXT[]="Shape Recognition"; - static const char *EXTENSIONS[]={SEQ_INTERPOL_EXT,MEDFILEIO_EXT,RENUM_EXT,PART_EXT,PAR_INTERPOL_EXT}; + static const char *EXTENSIONS[]={SEQ_INTERPOL_EXT,MEDFILEIO_EXT,RENUM_EXT,PART_EXT,PAR_INTERPOL_EXT,SHAPE_RECOGNITION_EXT}; static const int NB_OF_EXTENSIONS=sizeof(EXTENSIONS)/sizeof(const char *); %} @@ -148,6 +149,9 @@ #endif #ifdef WITH_PARALLEL_INTERPOLATOR ret.push_back(std::string(PAR_INTERPOL_EXT)); +#endif +#ifdef WITH_SHAPE_RECOGN + ret.push_back(std::string(SHAPE_RECOGNITION_EXT)); #endif return ret; } -- 2.39.2