diff --git a/cmake/QtInternalTargets.cmake b/cmake/QtInternalTargets.cmake index cdaa91ffcb4..a04e2169435 100644 --- a/cmake/QtInternalTargets.cmake +++ b/cmake/QtInternalTargets.cmake @@ -6,7 +6,7 @@ function(qt_internal_set_warnings_are_errors_flags target) if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "3.0.0") list(APPEND flags -Werror -Wno-error=\#warnings -Wno-error=deprecated-declarations) endif() - if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + if(CMAKE_SYSTEM_NAME STREQUAL "Windows") # Clang will otherwise show error about inline method conflicting with dllimport class attribute in tools # (this was tested with Clang 10) # error: 'QString::operator[]' redeclared inline; 'dllimport' attribute ignored [-Werror,-Wignored-attributes]