From 896db3806dce60f010484f376c17a0cc0062f767 Mon Sep 17 00:00:00 2001 From: p01arst0rm Date: Sat, 17 Apr 2021 14:40:24 +0100 Subject: [PATCH] replaced CMAKE_COMPILER_IS_GNUCXX with CMAKE_CXX_COMPILER_ID --- 3rdparty/libusb_cmake/config.cmake | 2 +- CMakeLists.txt | 2 +- rpcs3/cmake_modules/ConfigureCompiler.cmake | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3rdparty/libusb_cmake/config.cmake b/3rdparty/libusb_cmake/config.cmake index 66eb27b5f0..57f19f07a6 100644 --- a/3rdparty/libusb_cmake/config.cmake +++ b/3rdparty/libusb_cmake/config.cmake @@ -2,7 +2,7 @@ include(CheckCXXCompilerFlag) include(CheckIncludeFiles) include(CheckTypeSize) -if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) +if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") if (NOT OS_WINDOWS) # mingw appears to print a bunch of warnings about this check_cxx_compiler_flag("-fvisibility=hidden" HAVE_VISIBILITY) diff --git a/CMakeLists.txt b/CMakeLists.txt index f901e658f9..576ec73b26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.14.1) project(rpcs3) -if(CMAKE_COMPILER_IS_GNUCXX) +if(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) message(FATAL_ERROR "RPCS3 requires at least gcc-9.") endif() diff --git a/rpcs3/cmake_modules/ConfigureCompiler.cmake b/rpcs3/cmake_modules/ConfigureCompiler.cmake index d65e3f4c5d..3e46563a49 100644 --- a/rpcs3/cmake_modules/ConfigureCompiler.cmake +++ b/rpcs3/cmake_modules/ConfigureCompiler.cmake @@ -50,7 +50,7 @@ else() if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Werror=inconsistent-missing-override) - elseif(CMAKE_COMPILER_IS_GNUCXX) + elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") add_compile_options(-Werror=suggest-override) add_compile_options(-Wclobbered) add_compile_options(-Wcast-function-type) @@ -59,7 +59,7 @@ else() endif() #TODO Clean the code so these are removed - if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.1 OR NOT CMAKE_COMPILER_IS_GNUCXX) + if ((not ${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") OR (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.1)) add_compile_options(-Wno-attributes) endif() @@ -69,7 +69,7 @@ else() add_compile_options(-Wno-unused-private-field) add_compile_options(-Wno-delete-non-virtual-dtor) add_compile_options(-Wno-unused-command-line-argument) - elseif(CMAKE_COMPILER_IS_GNUCXX) + elseif(${CMAKE_CXX_COMPILER_ID} MATCHES "GNU") add_compile_options(-Wno-class-memaccess) endif()