CMake: Set minimum version first

Makes policy enabling based on minimum version work properly
Also increases minimum version to 3.11 because we actually do use 3.11 features
This commit is contained in:
kenshen112 2021-11-27 18:07:13 -07:00 committed by tellowkrinkle
parent e6f72fdde7
commit ac8582eca7
2 changed files with 5 additions and 9 deletions

View File

@ -1,13 +1,9 @@
# Project Name
project(Pcsx2)
# Debian-based distributions require at least 2.8.5 due to multiarch.
# Bumping up to 3.0 seems reasonable at this point, and will let us modernize
# things a bit.
#
# Setting it to a range tells it that it supports the features on the newer
# versions as well, avoiding setting policies.
cmake_minimum_required(VERSION 3.10...3.17)
cmake_minimum_required(VERSION 3.11...3.22)
# Project Name
project(Pcsx2)
# Variable to check that people use the good file
set(TOP_CMAKE_WAS_SOURCED TRUE)

View File

@ -72,7 +72,7 @@ endif()
#-------------------------------------------------------------------------------
option(USE_ASAN "Enable address sanitizer")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(USE_CLANG TRUE)
message(STATUS "Building with Clang/LLVM.")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")