From 677ca8482474b16ce874aa7ba56d1100dd43335e Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 15 Dec 2019 09:18:08 +0300 Subject: [PATCH] Silent warnings about unused command line args when building ASM source --- contrib/icu-cmake/CMakeLists.txt | 4 ++++ contrib/openssl-cmake/CMakeLists.txt | 3 +++ libs/libglibc-compatibility/CMakeLists.txt | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/contrib/icu-cmake/CMakeLists.txt b/contrib/icu-cmake/CMakeLists.txt index 95f06812673..64e82366076 100644 --- a/contrib/icu-cmake/CMakeLists.txt +++ b/contrib/icu-cmake/CMakeLists.txt @@ -453,3 +453,7 @@ target_include_directories(icui18n SYSTEM PUBLIC ${ICU_SOURCE_DIR}/i18n/) target_compile_definitions(icuuc PRIVATE -DU_COMMON_IMPLEMENTATION) target_compile_definitions(icui18n PRIVATE -DU_I18N_IMPLEMENTATION) + +if (COMPILER_CLANG) + target_compile_options(icudata PRIVATE -Wno-unused-command-line-argument) +endif () diff --git a/contrib/openssl-cmake/CMakeLists.txt b/contrib/openssl-cmake/CMakeLists.txt index 3e73bbcef9d..3a95b6abf28 100644 --- a/contrib/openssl-cmake/CMakeLists.txt +++ b/contrib/openssl-cmake/CMakeLists.txt @@ -27,6 +27,9 @@ elseif(ARCH_AARCH64) endif() enable_language(ASM) +if (COMPILER_CLANG) + add_definitions(-Wno-unused-command-line-argument) +endif () if (ARCH_AMD64) macro(perl_generate_asm FILE_IN FILE_OUT) diff --git a/libs/libglibc-compatibility/CMakeLists.txt b/libs/libglibc-compatibility/CMakeLists.txt index 1b40cd4f4cc..7a0d2c77355 100644 --- a/libs/libglibc-compatibility/CMakeLists.txt +++ b/libs/libglibc-compatibility/CMakeLists.txt @@ -36,6 +36,10 @@ if (GLIBC_COMPATIBILITY) add_library(glibc-compatibility STATIC ${glibc_compatibility_sources}) + if (COMPILER_CLANG) + target_compile_options(glibc-compatibility PRIVATE -Wno-unused-command-line-argument) + endif () + target_include_directories(glibc-compatibility PRIVATE libcxxabi ${musl_arch_include_dir}) if (NOT USE_STATIC_LIBRARIES AND NOT MAKE_STATIC_LIBRARIES)