Misc organizing and bug fixing

This commit is contained in:
Zion Nimchuk 2017-06-12 11:45:29 -07:00 committed by Ani
parent 23d1ddbb8e
commit e1a78abfc9
4 changed files with 72 additions and 77 deletions

View file

@ -1,19 +1,19 @@
cmake_minimum_required(VERSION 2.8.12)
# Check and configure compiler options for RPCS3
if(CMAKE_COMPILER_IS_GNUCXX)
# Get GCC version
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
string(REGEX MATCHALL "[0-9]+" GCC_VERSION_COMPONENTS ${GCC_VERSION})
list(GET GCC_VERSION_COMPONENTS 0 GCC_MAJOR)
list(GET GCC_VERSION_COMPONENTS 1 GCC_MINOR)
# GCC 4.9 and lower are too old
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9.0)
message(FATAL_ERROR
"GCC ${CMAKE_CXX_COMPILER_VERSION} is too old.")
endif()
if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.1)
message( FATAL_ERROR "RPCS3 can't be compiled with gcc-6.1, see #1691." )
endif()
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
message( FATAL_ERROR "RPCS3 requires at least gcc-5.1." )
endif()
# FIXME: do we really need this?
# GCC 6.1 is insufficient to compile, because of a regression bug
#if(GCC_MAJOR EQUAL "6" AND GCC_MINOR EQUAL "1")
@ -31,11 +31,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
# Clang 3.4 and lower are too old
if(CLANG_VERSION_MAJOR LESS "3" AND CLANG_VERSION_MINOR LESS "4")
#if(CLANG_VERSION_MAJOR LESS "3" AND CLANG_VERSION_MINOR LESS "4")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
message(FATAL_ERROR
"Clang ${CLANG_VERSION_MAJOR}.${CLANG_VERSION_MINOR} is too old.")
"Clang ${CMAKE_CXX_COMPILER_VERSION} is too old.")
endif()
# Set compiler options here
add_compile_options(-ftemplate-depth=1024)