From bf7a5e40a86955564d63edbfef675540da049c00 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 1 Sep 2021 08:34:12 -0700 Subject: [PATCH] build: fix the support for CMake[<3.7] The `VERSION_GREATER_EQUAL` operator was introduced in CMake 3.7.0 (released in 2016). Use the long form of the check by splitting the operation into two comparisons to support the older CMake. --- cmake/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 5544f919fe..caa92150c7 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -184,7 +184,7 @@ else (protobuf_BUILD_SHARED_LIBS) # Prior to CMake 3.15, the MSVC runtime library was pushed into the same flags # making programmatic control difficult. Prefer the functionality in newer # CMake versions when available. - if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.15) + if(CMAKE_VERSION VERSION_GREATER 3.15 OR CMAKE_VERSION VERSION_EQUAL 3.15) set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$:Debug>) else() # In case we are building static libraries, link also the runtime library statically