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 <joerg.bornemann@qt.io> Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
e9e3c09f4b
commit
83e222d8ca
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user