summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarmen Stoppels <me@harmenstoppels.nl>2024-11-22 18:41:23 +0100
committerGitHub <noreply@github.com>2024-11-22 18:41:23 +0100
commit5dacb774f6f489d7f521fd11eb4a3391ac45e6c3 (patch)
treeae63636efa131d5144d1b4776ab45f1affa3c2d1
parentcb3d6549c988cb914583e4d220a2d1c0b0aa6ae2 (diff)
downloadspack-5dacb774f6f489d7f521fd11eb4a3391ac45e6c3.tar.gz
spack-5dacb774f6f489d7f521fd11eb4a3391ac45e6c3.tar.bz2
spack-5dacb774f6f489d7f521fd11eb4a3391ac45e6c3.tar.xz
spack-5dacb774f6f489d7f521fd11eb4a3391ac45e6c3.zip
itk: use vendored googletest (#47687)
external googletest breaks dependents because they end up with ITK_LIBRARIES set to `GTest::GTest;GTest::Main`, which then end up literally in a nonsensical link line `-lGTest::GtTest`. the vendored googletest produces a cmake config file where `ITKGoogleTest_LIBRARIES` is empty.
-rw-r--r--var/spack/repos/builtin/packages/itk/package.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/itk/package.py b/var/spack/repos/builtin/packages/itk/package.py
index dd3ac52049..f5155a7cc5 100644
--- a/var/spack/repos/builtin/packages/itk/package.py
+++ b/var/spack/repos/builtin/packages/itk/package.py
@@ -63,7 +63,6 @@ class Itk(CMakePackage):
depends_on("eigen")
depends_on("expat")
depends_on("fftw-api")
- depends_on("googletest")
depends_on("hdf5+cxx+hl")
depends_on("jpeg")
depends_on("libpng")
@@ -79,8 +78,11 @@ class Itk(CMakePackage):
def cmake_args(self):
use_mkl = self.spec["fftw-api"].name in INTEL_MATH_LIBRARIES
args = [
+ self.define("BUILD_TESTING", False),
self.define("BUILD_SHARED_LIBS", True),
self.define("ITK_USE_SYSTEM_LIBRARIES", True),
+ # https://github.com/InsightSoftwareConsortium/ITK/issues/303
+ self.define("ITK_USE_SYSTEM_GOOGLETEST", False),
self.define("ITK_USE_MKL", use_mkl),
self.define_from_variant("Module_ITKReview", "review"),
self.define_from_variant("Module_RTK", "rtk"),