Skip to content

Commit

Permalink
Bump minimum cmake version to 3.5 to avoid deprecation warning
Browse files Browse the repository at this point in the history
Building msgpack gives currently gives the following warning:
"CMake Deprecation Warning at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions."
  • Loading branch information
dundargoc committed Oct 17, 2023
1 parent 3a41b24 commit df5726b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
CMAKE_MINIMUM_REQUIRED (VERSION 2.8.12)

IF ((CMAKE_VERSION VERSION_GREATER 3.1) OR
(CMAKE_VERSION VERSION_EQUAL 3.1))
CMAKE_POLICY(SET CMP0054 NEW)
ENDIF ()
CMAKE_MINIMUM_REQUIRED (VERSION 3.5)
CMAKE_POLICY(SET CMP0060 OLD)

OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." OFF)
OPTION (MSGPACK_GEN_COVERAGE "Enable running gcov to get a test coverage report." OFF)
Expand Down Expand Up @@ -38,7 +34,7 @@ IF (BIGENDIAN)
SET(MSGPACK_ENDIAN_LITTLE_BYTE 0)
ELSE ()
SET(MSGPACK_ENDIAN_BIG_BYTE 0)
SET(MSGPACK_ENDIAN_LITTLE_BYTE 1)
SET(MSGPACK_ENDIAN_LITTLE_BYTE 1)
ENDIF ()

CONFIGURE_FILE (
Expand Down
2 changes: 1 addition & 1 deletion example/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 3.0)
cmake_minimum_required (VERSION 3.5)
project (example)

if(EXAMPLE_MSGPACK_EMBEDDED)
Expand Down

0 comments on commit df5726b

Please sign in to comment.