aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2023-11-25 12:39:08 -0800
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2023-12-02 20:17:26 +0100
commitb3f58020d145a85506b0c7e51b75d5f7288abe1c (patch)
tree3ee51fa6eb6b9f6d34a366e23e3ad5bef604b199 /CMakeLists.txt
parent87aad6c4fcaeaed01e2d289fc38a02991cacaf18 (diff)
downloadtcpdump-b3f58020d145a85506b0c7e51b75d5f7288abe1c.tar.gz
CMake: attempt to suppress deprecation errors.
Yes, we should probably fix them at some point, but not Right This Instant. This should squelch the warnings in #1087, but leave that open, pending a decision on which release of CMake to require on non-Windows platforms. (cherry picked from commit 6193b88600f3d4bc506f3b36015279476ef03f02)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 14 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d340dbd6..b34d6cac 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,18 +5,22 @@ if(WIN32)
cmake_minimum_required(VERSION 3.12)
else(WIN32)
#
- # For now, require only 2.8.12, 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.
+ # For now:
#
- # If this is ever updated to CMake 3.1 or later, remove the
- # stuff in cmake/Modules/FindPCAP.cmake that appends subdirectories
- # of directories from CMAKE_PREFIX_PATH to the PKG_CONFIG_PATH
- # environment variable when running pkg-config, to make sure
- # it finds any .pc file from there.
+ # if this is a version of CMake less than 3.5, require only
+ # 2.8.12, 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;
#
- cmake_minimum_required(VERSION 2.8.12)
+ # otherwise, require 3.5, so we don't get messages warning
+ # that support for versions of CMake lower than 3.5 is
+ # deprecated.
+ #
+ if(CMAKE_VERSION VERSION_LESS "3.5")
+ cmake_minimum_required(VERSION 2.8.12)
+ else()
+ cmake_minimum_required(VERSION 3.5)
+ endif()
endif(WIN32)
#