diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-24 15:51:45 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-24 14:52:59 +0000 |
commit | a37771ebc58f2387b040dcc1e6a2053dbd43cf00 (patch) | |
tree | fdba70580b645b96a3c0fbdb5ec1171aa9b2d499 /cmake | |
parent | d2c2ff83376e8b902549b8c15597460d721d7250 (diff) |
Check for the correct apple clang version with warnings_are_errors
The current state of qtbase is confirmed to be built with no warnings
when using up to Xcode 9.2, as per the check in
mkspecs/features/qt_common.prf. Add the same check for the CMake
build.
Change-Id: I0c2409ece048e93fba29c41a8bd053dd112949bd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtInternalTargets.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index 1fb1cc7fcd..ad8ded29cf 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -8,7 +8,7 @@ function(qt_internal_set_warnings_are_errors_flags target) elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang") # using AppleClang # Apple clang 4.0+ - if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "4.0.0") + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "4.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS_EQUAL "9.2") target_compile_options("${target}" INTERFACE -Werror -Wno-error=\#warnings -Wno-error=deprecated-declarations) endif() elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") |