Skip to content

Add vtk io legacy package #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions arcane/cmake/Modules/FindvtkIOLegacy.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# VTK peut se trouver soit directement, soit via Paraview.
# Pour Arcane, vtkIOLegacy est utilisé pour la lecture des maillages polyédriques
# Voir fichier 'FindvtkIOXML' pour plus d'infos
arccon_return_if_package_found(vtkIOLegacy)

find_package(ParaView QUIET)
find_package(VTK QUIET COMPONENTS vtkIOLegacy)

if (VTK_FOUND)
message(STATUS "VTK (for vtkIOLegacy) version ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}")
endif()

if(TARGET vtkIOLegacy)
set(vtkIOLegacy_FOUND TRUE)
message(STATUS "vtkIOLegacy_INCLUDE_DIRS = ${vtkIOLegacy_INCLUDE_DIRS}")
arcane_vtkutils_add_depend_lib_to_list(vtkIOLegacy)
message(STATUS "vtkIOLegacy LIBS=${_ALLLIBS}")
set(vtkIOLegacy_LIBRARIES "${_ALLLIBS}")
arccon_register_package_library(vtkIOLegacy vtkIOLegacy)
# Pour compatibilité avec l'existant (septembre 2022)
add_library(arcane::vtkIOLegacy ALIAS arcconpkg_vtkIOLegacy)
endif()

# ----------------------------------------------------------------------------
# Local Variables:
# tab-width: 2
# indent-tabs-mode: nil
# coding: utf-8-with-signature
# End:
7 changes: 3 additions & 4 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)
set(PRIVATE_PKGS LibUnwind Papi Parmetis PTScotch Udunits Zoltan BZip2 LZ4 Otf2 DbgHelp HWLoc Hiredis)
set(PUBLIC_PKGS HDF5 MPI vtkIOXML vtkIOLegacy)
set(PKGS ${PRIVATE_PKGS} ${PUBLIC_PKGS})

foreach(package ${PKGS})
Expand Down Expand Up @@ -145,11 +145,10 @@ if(ARCANE_HAS_LINUX_PERF_COUNTERS)
)
endif()

if(vtkIOXML_FOUND)
if(vtkIOXML_FOUND AND vtkIOLegacy_FOUND)
list(APPEND ARCANE_SOURCES
VtkPolyhedralMeshIOService.cc
)
list(APPEND PRIVATE_PKGS vtkIOXML)
endif()

if (ARCANE_HAS_KDI_PYTHON)
Expand Down
4 changes: 2 additions & 2 deletions arcane/src/arcane/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(TEST_DIRS . anyitem dof inout)
set(TEST_DIRS . anyitem dof inout)

set(TEST_LIBS ${ARCANE_ADDITIONNAL_TEST_LIBRARIES})
if(MPI_FOUND AND NOT WIN32)
Expand Down Expand Up @@ -560,7 +560,7 @@ if(HDF5_FOUND)
endif()
if(vtkIOXML_FOUND)
ARCANE_ADD_TEST_SEQUENTIAL(vtk_vtu testMesh-format_vtu.arc)
if (Neo_FOUND)
if (vtkIO_Legacy AND Neo_FOUND)
arcane_add_test_sequential(polyhedral_vtk1 testMeshPolyhedral-1.arc)
arcane_add_test_sequential(polyhedral_vtk2 testMeshPolyhedral-2.arc)
arcane_add_test_sequential(polyhedral_vtk3 testMeshPolyhedral-3.arc)
Expand Down
Loading