Skip to content

Commit b95a220

Browse files
committed
ENH: Disable Google dependency and tests with ITK version <4.12
1 parent a130da9 commit b95a220

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

itk-module.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ file(READ "${MY_CURRENT_DIR}/README.rst" DOCUMENTATION)
1010
# By convention those modules outside of ITK are not prefixed with
1111
# ITK.
1212

13+
if( NOT "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}" VERSION_LESS "4.12" )
14+
set(_GoogleTest_DEPENDS ITKGoogleTest)
15+
endif()
16+
1317
# define the dependencies of the include module and the tests
1418
itk_module(TextureFeatures
1519
DEPENDS
@@ -22,7 +26,7 @@ itk_module(TextureFeatures
2226
ITKMetaIO
2327
ITKImageIntensity
2428
ITKImageNoise
25-
ITKGoogleTest
29+
${_GoogleTest_DEPENDS}
2630
DESCRIPTION
2731
"${DOCUMENTATION}"
2832
EXCLUDE_FROM_DEFAULT

test/CMakeLists.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,11 @@ itk_add_test(NAME itkFirstOrderTextureFeaturesImageFilterTest1
251251
5
252252
)
253253

254-
set(TextureFeaturesGTests
255-
itkFirstOrderTextureFeaturesImageFilterGTest.cxx
256-
)
254+
if( NOT "${ITK_VERSION_MAJOR}.${ITK_VERSION_MINOR}" VERSION_LESS "4.12" )
255+
set(TextureFeaturesGTests
256+
itkFirstOrderTextureFeaturesImageFilterGTest.cxx
257+
)
257258

258-
CreateGoogleTestDriver(TextureFeatures "${TextureFeatures-Test_LIBRARIES}" "${TextureFeaturesGTests}")
259+
CreateGoogleTestDriver(TextureFeatures "${TextureFeatures-Test_LIBRARIES}" "${TextureFeaturesGTests}")
260+
261+
endif()

0 commit comments

Comments
 (0)