diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2021-10-12 10:39:00 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2021-10-13 12:49:49 -0700 |
commit | 63d80c7c4b23b5802f1f20e6b322ccf4cdff5b12 (patch) | |
tree | b576f6c4d61b540ca6b179d3abe56cc6d06aca8a /cmake/QtInternalTargets.cmake | |
parent | 2630c15a3de65d118afd11bbeb349a415a4aa1d0 (diff) |
CMake: add support for Intel's LLVM-based compiler
This includes a few cleanups to our .cmake files where it was easier to
combine existing sections of Clang / AppleClang that no longer needed to
be distinct.
icpx could be replaced with a shell script:
exec `basename $0`/clang++ --intel "$@"
tst_qnumeric is not passing
FAIL! : tst_QNumeric::classifyF() Compared values are not the same
Actual (qFpClassify(tiny / two)): 2
Expected (FP_SUBNORMAL) : 3
Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(344)]
FAIL! : tst_QNumeric::classifyD() Compared values are not the same
Actual (qFpClassify(tiny / two)): 2
Expected (FP_SUBNORMAL) : 3
Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(344)]
FAIL! : tst_QNumeric::floatDistance(denormal) Compared values are not the same
Actual (qFloatDistance(from, stop)): 0
Expected (expectedDistance) : 4194304
Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(408)]
FAIL! : tst_QNumeric::doubleDistance(denormal) Compared values are not the same
Actual (qFloatDistance(from, stop)): 0
Expected (expectedDistance) : 2251799813685248
Loc: [/home/tjmaciei/src/qt/qt6-icx/qtbase/tests/auto/corelib/global/qnumeric/tst_qnumeric.cpp(408)]
P
Change-Id: Icb2516126f674e7b8bb3fffd16ad59431e8c3379
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtInternalTargets.cmake')
-rw-r--r-- | cmake/QtInternalTargets.cmake | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 7cc340d381..7bfa77d2b8 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -1,17 +1,8 @@ function(qt_internal_set_warnings_are_errors_flags target) set(flags "") - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" AND NOT MSVC) - # Regular clang 3.0+ - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "3.0.0") - list(APPEND flags -Werror -Wno-error=\#warnings -Wno-error=deprecated-declarations) - endif() - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - # using AppleClang - # Apple clang 4.0+ - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "4.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL "9.2") - list(APPEND flags -Werror -Wno-error=\#warnings -Wno-error=deprecated-declarations) - endif() + if (CLANG AND NOT MSVC) + list(APPEND flags -Werror -Wno-error=\#warnings -Wno-error=deprecated-declarations) elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # using GCC list(APPEND flags -Werror -Wno-error=cpp -Wno-error=deprecated-declarations) @@ -297,15 +288,7 @@ qt_auto_detect_implicit_sse2() function(qt_auto_detect_fpmath) # fpmath configuration adjustment in qt_module.prf set(fpmath_supported FALSE) - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "3.4") - set(fpmath_supported TRUE) - endif() - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "5.1") - set(fpmath_supported TRUE) - endif() - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang|GNU|IntelLLVM") set(fpmath_supported TRUE) endif() if(fpmath_supported AND TEST_architecture_arch STREQUAL "i386" AND __implicit_sse2_for_qt_modules_enabled) |