Permalink
Browse files

Check if gcc version is below 5.1 or equal to 6.1

Outputs a fatal_error if a version of gcc below 5.1 or 6.1 is being used.
#2236
  • Loading branch information...
1 parent 9e84804 commit 2d9e02b0a7912527c4e12a0904afd3993e3ee49b @AniLeo AniLeo committed with Nekotekina Dec 20, 2016
Showing with 8 additions and 0 deletions.
  1. +8 −0 CMakeLists.txt
View
@@ -11,6 +11,14 @@ if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." )
endif()
+if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
+ message( FATAL_ERROR "RPCS3 requires at least gcc-5.1." )
+endif()
+
+if (CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 6.1)
+ message( FATAL_ERROR "RPCS3 can't be compiled with gcc-6.1, see #1691." )
+endif()
+
add_definitions(-DCMAKE_BUILD)
# We use libpng's static library and don't need to build the shared library and run the tests

0 comments on commit 2d9e02b

Please sign in to comment.