Skip to content

Commit

Permalink
Merge pull request #4210 from facebook/cm310
Browse files Browse the repository at this point in the history
Update cmake minimum requirement to 3.10
  • Loading branch information
Victor-C-Zhang authored Dec 13, 2024
2 parents 17beeb5 + 1198a58 commit f7a8bb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# in the COPYING file in the root directory of this source tree).
# ################################################################

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)

# As of 2018-12-26 ZSTD has been validated to build with cmake version 3.13.2 new policies.
# Set and use the newest cmake policies that are validated to work
Expand Down
9 changes: 4 additions & 5 deletions build/cmake/CMakeModules/AddZstdCompilationFlags.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
include(CheckCXXCompilerFlag)
include(CheckCCompilerFlag)
# VERSION_GREATER_EQUAL requires CMake 3.7 or later.
# https://cmake.org/cmake/help/latest/command/if.html#version-greater-equal
if (CMAKE_VERSION VERSION_LESS 3.18)
set(ZSTD_HAVE_CHECK_LINKER_FLAG false)
else ()

if (CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
set(ZSTD_HAVE_CHECK_LINKER_FLAG true)
else ()
set(ZSTD_HAVE_CHECK_LINKER_FLAG false)
endif ()
if (ZSTD_HAVE_CHECK_LINKER_FLAG)
include(CheckLinkerFlag)
Expand Down

0 comments on commit f7a8bb1

Please sign in to comment.