Skip to content

Commit 6193b88

Browse files
committed
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.
1 parent 365175f commit 6193b88

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

CMakeLists.txt

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@ if(WIN32)
66
cmake_minimum_required(VERSION 3.12)
77
else(WIN32)
88
#
9-
# For now, require only 2.8.12, just in case somebody is
10-
# configuring with CMake on a "long-term support" version
11-
# of some OS and that version supplies an older version of
12-
# CMake.
9+
# For now:
1310
#
14-
# If this is ever updated to CMake 3.1 or later, remove the
15-
# stuff in cmake/Modules/FindPCAP.cmake that appends subdirectories
16-
# of directories from CMAKE_PREFIX_PATH to the PKG_CONFIG_PATH
17-
# environment variable when running pkg-config, to make sure
18-
# it finds any .pc file from there.
11+
# if this is a version of CMake less than 3.5, require only
12+
# 2.8.12, just in case somebody is configuring with CMake
13+
# on a "long-term support" version # of some OS and that
14+
# version supplies an older version of CMake;
1915
#
20-
cmake_minimum_required(VERSION 2.8.12)
16+
# otherwise, require 3.5, so we don't get messages warning
17+
# that support for versions of CMake lower than 3.5 is
18+
# deprecated.
19+
#
20+
if(CMAKE_VERSION VERSION_LESS "3.5")
21+
cmake_minimum_required(VERSION 2.8.12)
22+
else()
23+
cmake_minimum_required(VERSION 3.5)
24+
endif()
2125
endif(WIN32)
2226

2327
#

0 commit comments

Comments
 (0)