mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
Made CMake use a more reliable way for detecting the compiler version.
This commit is contained in:
parent
970b7dd63d
commit
dacda90186
|
@ -107,14 +107,12 @@ endif()
|
||||||
|
|
||||||
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||||
message("-- Compiler is Clang/LLVM")
|
message("-- Compiler is Clang/LLVM")
|
||||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE CLANG_VERSION)
|
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 5.0.0)
|
||||||
if(CLANG_VERSION VERSION_LESS 5.0.0)
|
|
||||||
message(SEND_ERROR "You need at least Clang 5.0.0 to compile EmulationStation-DE")
|
message(SEND_ERROR "You need at least Clang 5.0.0 to compile EmulationStation-DE")
|
||||||
endif()
|
endif()
|
||||||
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||||
message("-- Compiler is GNU/GCC")
|
message("-- Compiler is GNU/GCC")
|
||||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpfullversion OUTPUT_VARIABLE G++_VERSION)
|
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 7.1)
|
||||||
if(G++_VERSION VERSION_LESS 7.1)
|
|
||||||
message(SEND_ERROR "You need at least GCC 7.1 to compile EmulationStation-DE")
|
message(SEND_ERROR "You need at least GCC 7.1 to compile EmulationStation-DE")
|
||||||
endif()
|
endif()
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
|
|
Loading…
Reference in a new issue