mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
With older builds CMake will error out with `CXX_STANDARD is set to invalid value '17'` CXX_STANDARD 17 was added on CMake 3.8.X as found in the 3.8.2 documentation: https://cmake.org/cmake/help/v3.8/prop_tgt/CXX_STANDARD.html Also removes leftover from old VS2015/2017 mixed instructions, removes "Not GCC 6.1" since we require 7.3+ now and bumps Xcode to 10. Proper MacOS instructions will be added afterwards by someone else.
32 lines
890 B
CMake
32 lines
890 B
CMake
cmake_minimum_required(VERSION 3.8.2)
|
|
# Check and configure compiler options for RPCS3
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
|
# GCC 4.9 and lower are too old
|
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
|
|
message(FATAL_ERROR "RPCS3 requires at least gcc-5.1.")
|
|
endif()
|
|
# GCC 6.1 is blacklisted
|
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.1)
|
|
message(FATAL_ERROR "RPCS3 can't be compiled with gcc-6.1, see #1691.")
|
|
endif()
|
|
|
|
# Set compiler options here
|
|
|
|
# Warnings
|
|
add_compile_options(-Wno-attributes -Wno-enum-compare -Wno-invalid-offsetof)
|
|
|
|
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
|
# Clang 3.4 and lower are too old
|
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.5)
|
|
message(FATAL_ERROR "RPCS3 requires at least clang-3.5.")
|
|
endif()
|
|
|
|
# Set compiler options here
|
|
|
|
add_compile_options(-ftemplate-depth=1024)
|
|
if(APPLE)
|
|
add_compile_options(-stdlib=libc++)
|
|
endif()
|
|
endif()
|