mirror of https://github.com/PCSX2/pcsx2.git
CMake: Move unsupported compiler warning to end
This commit is contained in:
parent
96fb49e35c
commit
7c62b86ed9
|
@ -59,3 +59,13 @@ if(ACTUALLY_ENABLE_TESTS)
|
||||||
add_subdirectory(tests/ctest)
|
add_subdirectory(tests/ctest)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
#-------------------------------------------------------------------------------
|
||||||
|
if(NOT IS_SUPPORTED_COMPILER)
|
||||||
|
message(WARNING "
|
||||||
|
*************** UNSUPPORTED CONFIGURATION ***************
|
||||||
|
You are not compiling PCSX2 with a supported compiler.
|
||||||
|
It may not even build successfully.
|
||||||
|
PCSX2 only supports the Clang and MSVC compilers.
|
||||||
|
No support will be provided, continue at your own risk.
|
||||||
|
*********************************************************")
|
||||||
|
endif()
|
||||||
|
|
|
@ -20,14 +20,18 @@ endfunction()
|
||||||
function(detect_compiler)
|
function(detect_compiler)
|
||||||
if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
if(MSVC AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
set(USE_CLANG_CL TRUE PARENT_SCOPE)
|
set(USE_CLANG_CL TRUE PARENT_SCOPE)
|
||||||
|
set(IS_SUPPORTED_COMPILER TRUE PARENT_SCOPE)
|
||||||
message(STATUS "Building with Clang-CL.")
|
message(STATUS "Building with Clang-CL.")
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||||
set(USE_CLANG TRUE PARENT_SCOPE)
|
set(USE_CLANG TRUE PARENT_SCOPE)
|
||||||
|
set(IS_SUPPORTED_COMPILER TRUE PARENT_SCOPE)
|
||||||
message(STATUS "Building with Clang/LLVM.")
|
message(STATUS "Building with Clang/LLVM.")
|
||||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
set(USE_GCC TRUE PARENT_SCOPE)
|
set(USE_GCC TRUE PARENT_SCOPE)
|
||||||
message(STATUS "Building with GNU GCC. THIS IS NOT A SUPPORTED CONFIGURATION.")
|
set(IS_SUPPORTED_COMPILER FALSE PARENT_SCOPE)
|
||||||
|
message(STATUS "Building with GNU GCC.")
|
||||||
elseif(MSVC)
|
elseif(MSVC)
|
||||||
|
set(IS_SUPPORTED_COMPILER TRUE PARENT_SCOPE)
|
||||||
message(STATUS "Building with MSVC.")
|
message(STATUS "Building with MSVC.")
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||||
|
|
Loading…
Reference in New Issue