]> The Tcpdump Group git mirrors - tcpdump/commitdiff
CMake: fix to support CMake 3.31.
authorGuy Harris <[email protected]>
Wed, 13 Nov 2024 07:30:01 +0000 (23:30 -0800)
committerGuy Harris <[email protected]>
Wed, 13 Nov 2024 21:55:46 +0000 (13:55 -0800)
Expand the "still support old versions of CMake, for the benefit of
people with older versions, but avoid deprecation warnings/errors"
section to handle the deprecation of pre-3.10 versions by 3.31.

(cherry picked from commit 199bb821ba57097b8629a0d992779483b424e7a4)

CMakeLists.txt

index 8e986d6893360d235757e1ca5aaef171ee5422c3..a5c2c88346c5b8cc65f8bdf682a58cbcb6b3aa0f 100644 (file)
@@ -13,14 +13,21 @@ else(WIN32)
     #  on a "long-term support" version # of some OS and that
     #  version supplies an older version of CMake;
     #
-    #  otherwise, require 3.5, so we don't get messages warning
-    #  that support for versions of CMake lower than 3.5 is
+    #  otherwise, if it's a version less than 3.10, require only
+    #  3.10, just in case somebody is configuring with CMake
+    #  on a "long-term support" version # of some OS and that
+    #  version supplies an older version of CMake;
+    #
+    #  otherwise, require 3.10, so we don't get messages warning
+    #  that support for versions of CMake lower than 3.10 is
     #  deprecated.
     #
     if(CMAKE_VERSION VERSION_LESS "3.5")
         cmake_minimum_required(VERSION 2.8.12)
-    else()
+    elseif(CMAKE_VERSION VERSION_LESS "3.10")
         cmake_minimum_required(VERSION 3.5)
+    else()
+        cmake_minimum_required(VERSION 3.10)
     endif()
 endif(WIN32)