diff --git a/arcane/src/arcane/hdf5/CMakeLists.txt b/arcane/src/arcane/hdf5/CMakeLists.txt index 21a98d8847..43f1b5f90e 100644 --- a/arcane/src/arcane/hdf5/CMakeLists.txt +++ b/arcane/src/arcane/hdf5/CMakeLists.txt @@ -22,8 +22,22 @@ else() "Notwithstanding trying to use HDF5 but this may lead to errors during compilation.") endif() +# Pour MEDFile, il faut HDF5 mais le find_package fait planter CMake (avec MED 4.0.0) +# si HDF5 n'est pas trouvé. On ne fait donc le find_package que si HDF5 +# est trouvé +if (HDF5_FOUND) + list(APPEND PRIVATE_PKGS MEDFile) + arcane_find_package(MEDFile QUIET) +endif() + include(srcs.cmake) +if (MEDFILE_FOUND) + list(APPEND ARCANE_SOURCES MEDMeshReaderService.cc) +endif() + +# ---------------------------------------------------------------------------- + arcane_add_library(arcane_hdf5 INPUT_PATH ${Arcane_SOURCE_DIR}/src RELATIVE_PATH arcane/hdf5 @@ -36,6 +50,7 @@ arcane_add_library(arcane_hdf5 target_link_libraries(arcane_hdf5 PUBLIC arcane_core) arcane_add_arccon_packages(arcane_hdf5 PUBLIC ${PUBLIC_PKGS}) +arcane_add_arccon_packages(arcane_std PRIVATE ${PRIVATE_PKGS}) arcane_register_library(arcane_hdf5) diff --git a/arcane/src/arcane/std/MEDMeshReaderService.cc b/arcane/src/arcane/hdf5/MEDMeshReaderService.cc similarity index 100% rename from arcane/src/arcane/std/MEDMeshReaderService.cc rename to arcane/src/arcane/hdf5/MEDMeshReaderService.cc diff --git a/arcane/src/arcane/std/VtkHdfPostProcessor.axl b/arcane/src/arcane/hdf5/VtkHdfPostProcessor.axl similarity index 100% rename from arcane/src/arcane/std/VtkHdfPostProcessor.axl rename to arcane/src/arcane/hdf5/VtkHdfPostProcessor.axl diff --git a/arcane/src/arcane/std/VtkHdfPostProcessor.cc b/arcane/src/arcane/hdf5/VtkHdfPostProcessor.cc similarity index 99% rename from arcane/src/arcane/std/VtkHdfPostProcessor.cc rename to arcane/src/arcane/hdf5/VtkHdfPostProcessor.cc index 45f43eb93d..4838dd0a24 100644 --- a/arcane/src/arcane/std/VtkHdfPostProcessor.cc +++ b/arcane/src/arcane/hdf5/VtkHdfPostProcessor.cc @@ -30,8 +30,9 @@ #include "arcane/core/IParallelMng.h" #include "arcane/core/IMesh.h" -#include "arcane/std/Hdf5Utils.h" -#include "arcane/std/VtkHdfPostProcessor_axl.h" +#include "arcane/hdf5/Hdf5Utils.h" +#include "arcane/hdf5/VtkHdfPostProcessor_axl.h" +//TODO: mettre 'VtkCellTypes' ailleurs. #include "arcane/std/internal/VtkCellTypes.h" // Ce format est décrit sur la page web suivante: diff --git a/arcane/src/arcane/std/VtkHdfV2PostProcessor.axl b/arcane/src/arcane/hdf5/VtkHdfV2PostProcessor.axl similarity index 100% rename from arcane/src/arcane/std/VtkHdfV2PostProcessor.axl rename to arcane/src/arcane/hdf5/VtkHdfV2PostProcessor.axl diff --git a/arcane/src/arcane/std/VtkHdfV2PostProcessor.cc b/arcane/src/arcane/hdf5/VtkHdfV2PostProcessor.cc similarity index 99% rename from arcane/src/arcane/std/VtkHdfV2PostProcessor.cc rename to arcane/src/arcane/hdf5/VtkHdfV2PostProcessor.cc index b9e1fa3b5c..d18cec591e 100644 --- a/arcane/src/arcane/std/VtkHdfV2PostProcessor.cc +++ b/arcane/src/arcane/hdf5/VtkHdfV2PostProcessor.cc @@ -29,8 +29,9 @@ #include "arcane/core/IParallelMng.h" #include "arcane/core/IMesh.h" -#include "arcane/std/Hdf5Utils.h" -#include "arcane/std/VtkHdfV2PostProcessor_axl.h" +#include "arcane/hdf5/Hdf5Utils.h" +#include "arcane/hdf5/VtkHdfV2PostProcessor_axl.h" +//TODO: mettre 'VtkCellTypes' ailleurs. #include "arcane/std/internal/VtkCellTypes.h" #include diff --git a/arcane/src/arcane/hdf5/srcs.cmake b/arcane/src/arcane/hdf5/srcs.cmake index 07d531fc2c..2a3822fff9 100644 --- a/arcane/src/arcane/hdf5/srcs.cmake +++ b/arcane/src/arcane/hdf5/srcs.cmake @@ -10,6 +10,8 @@ set(ARCANE_SOURCES Hdf5VariableWriter.cc Hdf5MpiReaderWriter.cc Hdf5MpiReaderWriter.h + VtkHdfPostProcessor.cc + VtkHdfV2PostProcessor.cc ) set(AXL_FILES @@ -17,4 +19,6 @@ set(AXL_FILES Hdf5VariableReader Hdf5VariableWriter Hdf5MpiReaderWriter + VtkHdfPostProcessor + VtkHdfV2PostProcessor ) diff --git a/arcane/src/arcane/std/CMakeLists.txt b/arcane/src/arcane/std/CMakeLists.txt index b7a5a5456c..86ec661873 100644 --- a/arcane/src/arcane/std/CMakeLists.txt +++ b/arcane/src/arcane/std/CMakeLists.txt @@ -1,5 +1,5 @@ set(PRIVATE_PKGS LibUnwind Papi Parmetis PTScotch Udunits Zoltan BZip2 LZ4 Otf2 DbgHelp HWLoc Hiredis) -set(PUBLIC_PKGS HDF5 MPI vtkIOXML vtkIOLegacy) +set(PUBLIC_PKGS MPI vtkIOXML vtkIOLegacy) set(PKGS ${PRIVATE_PKGS} ${PUBLIC_PKGS}) foreach(package ${PKGS}) @@ -44,14 +44,6 @@ set(ARCANE_HAS_KDI ${ARCANE_HAS_KDI} CACHE BOOL "Is KDI available" FORCE) # ---------------------------------------------------------------------------- -# Pour MEDFile, il faut HDF5 mais le find_package fait planter CMake (avec MED 4.0.0) -# si HDF5 n'est pas trouvé. On ne fait donc le find_package que si HDF5 -# est trouvé -if(HDF5_FOUND) - list(APPEND PRIVATE_PKGS MEDFile) - arcane_find_package(MEDFile QUIET) -endif() - include(srcs.cmake) if(BZIP2_FOUND) @@ -60,16 +52,7 @@ endif() if(LZ4_FOUND) list(APPEND ARCANE_SOURCES LZ4DeflateService.cc) endif() -if(HDF5_FOUND) - list(APPEND ARCANE_SOURCES - VtkHdfPostProcessor.cc - VtkHdfV2PostProcessor.cc - ) -endif() -if(MEDFILE_FOUND) - list(APPEND ARCANE_SOURCES MEDMeshReaderService.cc) -endif() if(Parmetis_FOUND) list(APPEND ARCANE_SOURCES MetisMeshPartitioner.cc diff --git a/arcane/src/arcane/std/srcs.cmake b/arcane/src/arcane/std/srcs.cmake index b9fd97b5ac..b353887e1b 100644 --- a/arcane/src/arcane/std/srcs.cmake +++ b/arcane/src/arcane/std/srcs.cmake @@ -152,7 +152,5 @@ set(AXL_FILES SimpleCsvComparator SplitSDMeshPartitioner KdiPostProcessor - VtkHdfPostProcessor - VtkHdfV2PostProcessor VtkPolyhedralMeshIO )