2018-08-29 02:55:43 +02:00
|
|
|
cmake_minimum_required(VERSION 3.8.2)
|
2016-07-10 10:15:56 +02:00
|
|
|
# Check and configure compiler options for RPCS3
|
|
|
|
|
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
2018-08-31 16:58:46 +02:00
|
|
|
# GCC 7.3 or latter is required
|
|
|
|
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.3)
|
|
|
|
|
message(FATAL_ERROR "RPCS3 requires at least gcc-7.3.")
|
2017-06-12 20:45:29 +02:00
|
|
|
endif()
|
2016-07-10 10:15:56 +02:00
|
|
|
|
|
|
|
|
# Set compiler options here
|
|
|
|
|
|
|
|
|
|
# Warnings
|
|
|
|
|
add_compile_options(-Wno-attributes -Wno-enum-compare -Wno-invalid-offsetof)
|
|
|
|
|
|
2017-06-14 02:51:02 +02:00
|
|
|
elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
|
2018-08-31 16:58:46 +02:00
|
|
|
# Clang 5.0 or latter is required
|
|
|
|
|
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)
|
|
|
|
|
message(FATAL_ERROR "RPCS3 requires at least clang-5.0.")
|
2016-07-10 10:15:56 +02:00
|
|
|
endif()
|
2017-10-06 20:52:08 +02:00
|
|
|
|
2016-07-10 10:15:56 +02:00
|
|
|
# Set compiler options here
|
|
|
|
|
|
|
|
|
|
add_compile_options(-ftemplate-depth=1024)
|
|
|
|
|
if(APPLE)
|
|
|
|
|
add_compile_options(-stdlib=libc++)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|