Skip to content

Commit

Permalink
CMake: only set policy CMP0148 to OLD if version >= 3.27
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffro256 committed Jan 19, 2024
1 parent 8df8434 commit 694105e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
#
# Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers

cmake_minimum_required(VERSION 3.1)
message(STATUS "CMake version ${CMAKE_VERSION}")

set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

list(INSERT CMAKE_MODULE_PATH 0
Expand All @@ -37,15 +40,15 @@ include(CheckCXXCompilerFlag)
include(CheckLinkerFlag)
include(CheckLibraryExists)
include(CheckFunctionExists)
if (NOT("${CMAKE_VERSION}" VERSION_LESS 3.27)) # If CMake version >= 3.27
cmake_policy(SET CMP0148 OLD) # https://cmake.org/cmake/help/latest/policy/CMP0148.html
endif()
include(FindPythonInterp)

if (IOS)
INCLUDE(CmakeLists_IOS.txt)
endif()

cmake_minimum_required(VERSION 3.5)
message(STATUS "CMake version ${CMAKE_VERSION}")

project(monero)

option (USE_CCACHE "Use ccache if a usable instance is found" ON)
Expand Down

0 comments on commit 694105e

Please sign in to comment.