Skip to content

Commit

Permalink
[arcane,hdf5+std] Déplace 'VtkHdfPostProcessor', 'VtkHdfV2PostProcess…
Browse files Browse the repository at this point in the history
…or' et 'MEDMeshReaderService' de 'arcane_std' vers 'arcane_hdf5'.
  • Loading branch information
grospelliergilles committed Dec 26, 2024
1 parent 088035d commit 4b592f3
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 24 deletions.
15 changes: 15 additions & 0 deletions arcane/src/arcane/hdf5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <map>
Expand Down
4 changes: 4 additions & 0 deletions arcane/src/arcane/hdf5/srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@ set(ARCANE_SOURCES
Hdf5VariableWriter.cc
Hdf5MpiReaderWriter.cc
Hdf5MpiReaderWriter.h
VtkHdfPostProcessor.cc
VtkHdfV2PostProcessor.cc
)

set(AXL_FILES
Hdf5ReaderWriter
Hdf5VariableReader
Hdf5VariableWriter
Hdf5MpiReaderWriter
VtkHdfPostProcessor
VtkHdfV2PostProcessor
)
19 changes: 1 addition & 18 deletions arcane/src/arcane/std/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Expand Down Expand Up @@ -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)
Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions arcane/src/arcane/std/srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,5 @@ set(AXL_FILES
SimpleCsvComparator
SplitSDMeshPartitioner
KdiPostProcessor
VtkHdfPostProcessor
VtkHdfV2PostProcessor
VtkPolyhedralMeshIO
)

0 comments on commit 4b592f3

Please sign in to comment.