vtk: fix incorrect detection of -fvisibility (#48737)

This commit is contained in:
Harmen Stoppels 2025-01-27 22:12:40 +01:00 committed by GitHub
parent 3b81c0e6b7
commit 7568687f1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 32 additions and 0 deletions

View File

@ -87,6 +87,10 @@ class Vtk(CMakePackage):
conflicts("%gcc@13", when="@9.2")
# VTK 8 vendors a heavily outdated version of CMake's GenerateExportHeader module, which
# has a bogus version check for GCC/Intel version to early exit. This drops the early exit.
patch("vtk-bogus-compiler-check.patch", when="@7.1:8")
# Based on PyPI wheel availability
with when("+python"), default_args(type=("build", "link", "run")):
depends_on("python@:3.13")

View File

@ -0,0 +1,28 @@
From a444764fa92b8c4d5b49914ad9c8d8a9a4efafec Mon Sep 17 00:00:00 2001
From: Harmen Stoppels <me@harmenstoppels.nl>
Date: Mon, 27 Jan 2025 19:10:22 +0100
Subject: [PATCH] VTKGenerateExportHeader.cmake: remove faulty compiler version
check
---
CMake/VTKGenerateExportHeader.cmake | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/CMake/VTKGenerateExportHeader.cmake b/CMake/VTKGenerateExportHeader.cmake
index 9a7a76386e..59d0bf7ebf 100644
--- a/CMake/VTKGenerateExportHeader.cmake
+++ b/CMake/VTKGenerateExportHeader.cmake
@@ -204,9 +204,7 @@ macro(_vtk_test_compiler_hidden_visibility)
# Exclude XL here because it misinterprets -fvisibility=hidden even though
# the check_cxx_compiler_flag passes
# http://www.cdash.org/CDash/testDetails.php?test=109109951&build=1419259
- if(NOT GCC_TOO_OLD
- AND NOT _INTEL_TOO_OLD
- AND NOT WIN32
+ if(NOT WIN32
AND NOT CYGWIN
AND NOT CMAKE_CXX_COMPILER_ID MATCHES "XL"
AND NOT CMAKE_CXX_COMPILER_ID MATCHES "PGI"
--
2.43.0