Skip to content

Conversation

@blowekamp
Copy link
Member

@blowekamp blowekamp commented Dec 3, 2025

Replace the ExternalProject approach for GoogleTest/GTest with ContentFetch.

Now to support a custom location for GoogleTest, the CMake variable GOOGLETEST_ROOT should be passing to SimpleITK. This removed support for passing GTEST_ROOT to SimpleITK or SimpleITKSuperbuild.

GTest::GTest was depricated since CMake version 3.20
@blowekamp blowekamp changed the title Googletest fetchcontent Use CMake's ContentFetch for GoogleTest Dec 4, 2025
@blowekamp blowekamp force-pushed the googletest_fetchcontent branch from 9759ffe to 3481c45 Compare December 4, 2025 14:07
@blowekamp blowekamp requested review from dave3d and zivy December 4, 2025 14:11
Copy link
Member

@zivy zivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Removed the Superbuild GTest external project and replaced with
FetchContent in the SimpleITK core build. The superbuild only
downloaded the source and the GTest source was added as a
subdirectory. The FetchContent directly does this.

Note: To use an installed version of GTest/Google Test GOOGLETEST_ROOT
CMake variable should be set, previously GTEST_ROOT was expected to
point to googletest source code.
@blowekamp blowekamp force-pushed the googletest_fetchcontent branch from 3481c45 to d3cc9a0 Compare December 4, 2025 19:22
@blowekamp blowekamp merged commit d9889b1 into SimpleITK:main Dec 5, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants