From 83e222d8caf8fc54626bc66014c12d2af127cd5a Mon Sep 17 00:00:00 2001 From: Niclas Rosenvik Date: Tue, 16 Mar 2021 12:41:51 +0100 Subject: [PATCH] Properly set ICC and QCC Using CMAKE_C_COMPILER to match the compiler has its drawbacks. CMAKE_C_COMPILER can include the whole path to the compiler and directory names that incude icc, icl or qcc also match even if the compiler is not icc or qcc. Icc has the compiler id Intel according to the CMake documentation. The compiler id for qcc is QCC according to CMake policy 0047, and this is set to new since Qt requires CMake to be above 3.0. Change-Id: Iceb428ed10f0f5bbaa19ec2d883da186c85e7a73 Reviewed-by: Joerg Bornemann Reviewed-by: James McDonnell Reviewed-by: Alexandru Croitor --- cmake/QtPlatformSupport.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/QtPlatformSupport.cmake b/cmake/QtPlatformSupport.cmake index 1c428afe73d..02c0c0fb632 100644 --- a/cmake/QtPlatformSupport.cmake +++ b/cmake/QtPlatformSupport.cmake @@ -31,8 +31,8 @@ qt_set01(MACOS APPLE AND NOT UIKIT) qt_set01(GCC CMAKE_CXX_COMPILER_ID STREQUAL "GNU") qt_set01(CLANG CMAKE_CXX_COMPILER_ID MATCHES "Clang") qt_set01(APPLECLANG CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") -qt_set01(ICC CMAKE_C_COMPILER MATCHES "icc|icl") -qt_set01(QCC CMAKE_C_COMPILER MATCHES "qcc") # FIXME: How to identify this? +qt_set01(ICC CMAKE_CXX_COMPILER_ID STREQUAL "Intel") +qt_set01(QCC CMAKE_CXX_COMPILER_ID STREQUAL "QCC") # CMP0047 if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(QT_64BIT TRUE)