diff options
| -rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e4e4b73327..447d92aca7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1147,9 +1147,13 @@ option(ZLIB_ENABLE_TESTS "Build test binaries" ON) if(ZLIB_ENABLE_TESTS) enable_testing() - add_subdirectory(test) - if(WITH_BENCHMARKS) - add_subdirectory(test/benchmarks) + if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) + add_subdirectory(test) + if(WITH_BENCHMARKS) + add_subdirectory(test/benchmarks) + endif() + else() + message(WARNING "Minimum cmake version of 3.12 not met for GoogleTest or benchmarks!") endif() macro(configure_test_executable target) |
