Commit 6feb10fbc2b262f3cb8eb3f4a194e4754690a3bd

Authored by Henry Fredrick Schreiner
Committed by Henry Schreiner
1 parent 7472295d

Only split up discovery if CMake version is new enough

Showing 1 changed file with 5 additions and 1 deletions
cmake/AddGoogletest.cmake
@@ -34,7 +34,11 @@ set_target_properties(check PROPERTIES FOLDER "Scripts") @@ -34,7 +34,11 @@ set_target_properties(check PROPERTIES FOLDER "Scripts")
34 34
35 35
36 if(GOOGLE_TEST_INDIVIDUAL) 36 if(GOOGLE_TEST_INDIVIDUAL)
37 - include(GoogleTest) 37 + if(NOT CMAKE_VERSION VERSION_LESS 3.9)
  38 + include(GoogleTest)
  39 + else()
  40 + set(GOOGLE_TEST_INDIVIDUAL OFF)
  41 + endif()
38 endif() 42 endif()
39 43
40 # Target must already exist 44 # Target must already exist