Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: cleanup unused warnings #1057

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3071,6 +3071,7 @@ if (USE_BUILTIN_CA_BUNDLE_CRT)

if (WIN32 AND OS_AARCH64)
enable_language(ASM)
# silence some unsed definitions' warnings
if (COMPILER_CLANG)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument")
endif()
Expand All @@ -3079,6 +3080,7 @@ if (USE_BUILTIN_CA_BUNDLE_CRT)

if (OHOS OR ANDROID OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
enable_language(ASM)
# silence some unsed definitions' warnings
if (COMPILER_CLANG)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument")
endif()
Expand All @@ -3091,9 +3093,6 @@ if (USE_BUILTIN_CA_BUNDLE_CRT)

if (APPLE)
enable_language(ASM)
if (COMPILER_CLANG)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument")
endif()
set(ASIO_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/ca-bundle.crt.apple.s")
endif()

Expand Down Expand Up @@ -3122,6 +3121,7 @@ endif()

if (WIN32 AND OS_AARCH64)
enable_language(ASM)
# silence some unsed definitions' warnings
if (COMPILER_CLANG)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument")
endif()
Expand All @@ -3130,6 +3130,7 @@ endif()

if (OHOS OR ANDROID OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
enable_language(ASM)
# silence some unsed definitions' warnings
if (COMPILER_CLANG)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument")
endif()
Expand All @@ -3142,9 +3143,6 @@ endif()

if (APPLE)
enable_language(ASM)
if (COMPILER_CLANG)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-unused-command-line-argument")
endif()
set(ASIO_SUPPLEMENARY_CA_BUNDLE_CRT_SRC "third_party/ca-certificates/supplementary-ca-bundle.crt.apple.s")
endif()

Expand Down Expand Up @@ -3753,11 +3751,6 @@ if (COMPILER_GCC OR COMPILER_CLANG)
add_compile_options(-Wunguarded-availability)
endif()

# this may happens
if (COMPILER_CLANG)
add_link_options(-Wno-unused-command-line-argument)
endif()

if (COMPILER_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0)
add_compile_options(-Wno-alloc-size-larger-than)
endif()
Expand Down
Loading