From ba1462b551399ae40f022960aca9a53ca545e958 Mon Sep 17 00:00:00 2001 From: filipovic Date: Wed, 24 Jun 2026 07:03:58 +0200 Subject: [PATCH 1/2] fix vtk double import with ViennaPS --- CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c20bfaf9..d57da872 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,11 +333,21 @@ elseif(VIENNALS_USE_VTK) OFF CACHE BOOL "" FORCE) - if(NOT VIENNALS_PACKAGE_PYTHON) + set(_VIENNALS_REUSE_EXISTING_VTK FALSE) + if(TARGET VTK::CommonCore) + set(_VIENNALS_REUSE_EXISTING_VTK TRUE) + set(VTK_FOUND TRUE) + elseif(NOT VIENNALS_PACKAGE_PYTHON) find_package(VTK 9.0.0 QUIET) endif() - if(VTK_FOUND) + if(_VIENNALS_REUSE_EXISTING_VTK) + if(DEFINED VTK_VERSION) + message(STATUS "[ViennaLS] Reusing existing VTK targets ${VTK_VERSION}") + else() + message(STATUS "[ViennaLS] Reusing existing VTK targets") + endif() + elseif(VTK_FOUND) message(STATUS "[ViennaLS] Using system VTK ${VTK_VERSION}") else() message(STATUS "[ViennaLS] Using bundled VTK v9.3.1") From 21f2be01659c2be688b6f7be5606606cdcc8dc92 Mon Sep 17 00:00:00 2001 From: filipovic Date: Wed, 24 Jun 2026 22:40:28 +0200 Subject: [PATCH 2/2] fix: skip VTK discovery when targets already exist in scope --- CMakeLists.txt | 2 +- README.md | 2 +- include/viennals/lsVersion.hpp | 4 ++-- pyproject.toml | 2 +- python/viennals/__init__.pyi | 4 ++-- python/viennals/_core.pyi | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d57da872..94b378a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20 FATAL_ERROR) project( ViennaLS LANGUAGES CXX - VERSION 5.8.2) + VERSION 5.8.3) # -------------------------------------------------------------------------------------------------------- # Library options diff --git a/README.md b/README.md index bd876790..7c4cbadf 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ We recommend using [CPM.cmake](https://github.com/cpm-cmake/CPM.cmake) to consum * Installation with CPM ```cmake - CPMAddPackage("gh:viennatools/viennals@5.8.2") + CPMAddPackage("gh:viennatools/viennals@5.8.3") ``` * With a local installation diff --git a/include/viennals/lsVersion.hpp b/include/viennals/lsVersion.hpp index 79e716ea..4d109fa3 100644 --- a/include/viennals/lsVersion.hpp +++ b/include/viennals/lsVersion.hpp @@ -5,10 +5,10 @@ namespace viennals { // Version information generated by CMake -inline constexpr const char *version = "5.8.2"; +inline constexpr const char *version = "5.8.3"; inline constexpr int versionMajor = 5; inline constexpr int versionMinor = 8; -inline constexpr int versionPatch = 2; +inline constexpr int versionPatch = 3; // Utility functions for version comparison inline constexpr uint32_t versionAsInteger() { diff --git a/pyproject.toml b/pyproject.toml index 954bdb7a..3cd55daf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ build-backend = "scikit_build_core.build" [project] -version = "5.8.2" +version = "5.8.3" name = "ViennaLS" readme = "README.md" license = {file = "LICENSE"} diff --git a/python/viennals/__init__.pyi b/python/viennals/__init__.pyi index b79788c8..eede643b 100644 --- a/python/viennals/__init__.pyi +++ b/python/viennals/__init__.pyi @@ -133,7 +133,7 @@ ILU0: _core.GpuPreconditioner # value = Jacobi: _core.GpuPreconditioner # value = PROXY_DIM: int = 2 _SHARED_OXIDATION_TYPES: tuple = ('OxidationParameters', 'OxidationPresets', 'OxidationDeformationParameters', 'OxidationMaskParameters', 'OxidationCouplingParameters') -__version__: str = '5.8.2' +__version__: str = '5.8.3' _name: str = 'OxidationCouplingParameters' -version: str = '5.8.2' +version: str = '5.8.3' _C = _core diff --git a/python/viennals/_core.pyi b/python/viennals/_core.pyi index e21b0ffb..be8ed3fe 100644 --- a/python/viennals/_core.pyi +++ b/python/viennals/_core.pyi @@ -1063,6 +1063,6 @@ Cpu: GpuMode # value = Gpu: GpuMode # value = ILU0: GpuPreconditioner # value = Jacobi: GpuPreconditioner # value = -__version__: str = '5.8.2' -version: str = '5.8.2' +__version__: str = '5.8.3' +version: str = '5.8.3' IntegrationSchemeEnum = SpatialSchemeEnum