From 05a7cbef5b6a32edd31f42da4ace2e7ab1fd35da Mon Sep 17 00:00:00 2001 From: Kuntal Majumder Date: Sat, 18 Feb 2023 14:18:33 +0100 Subject: [PATCH] Allow building with llvm-clang in macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supressing the linking warnings on macOS are relevant when we are using AppleClang and not upstream Clang. The provided arguments do not apply to llvm-ar and llvm-ranlib. Change-Id: I8b664c01802b47077eb0ab80dab7681ee0bfcaa9 Reviewed-by: Tor Arne Vestbø --- cmake/QtBuild.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 6bf4a9edd56..322926a5b3a 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -426,7 +426,7 @@ set(QT_TOP_LEVEL_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}") # Prevent warnings about object files without any symbols. This is a common # thing in Qt as we tend to build files unconditionally, and then use ifdefs # to compile out parts that are not relevant. -if(CMAKE_HOST_APPLE AND APPLE) +if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") foreach(lang ASM C CXX) # We have to tell 'ar' to not run ranlib by itself, by passing the 'S' option set(CMAKE_${lang}_ARCHIVE_CREATE " qcS ")