mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Disable -Wunqualified-std-cast-call explicitly in CMake
When importing libraries with swiftc, the pragma to ignore this warning isn't respected. So apply it on the command line.
This commit is contained in:
parent
fa5800ebc5
commit
15f25d56b8
Notes:
github-actions[bot]
2024-08-07 00:29:23 +00:00
Author: https://github.com/ADKaster Commit: https://github.com/LadybirdBrowser/ladybird/commit/15f25d56b85 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/965
2 changed files with 4 additions and 8 deletions
|
@ -6,15 +6,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Platform.h>
|
||||
|
||||
#if defined(AK_COMPILER_CLANG)
|
||||
# pragma clang diagnostic ignored "-Wunqualified-std-cast-call"
|
||||
#endif
|
||||
|
||||
#include <AK/StdLibExtraDetails.h>
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Platform.h>
|
||||
#include <AK/StdLibExtraDetails.h>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
|
|
@ -81,6 +81,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_SIMULATE_ID MATCHES
|
|||
add_cxx_compile_options(-Wno-implicit-const-int-float-conversion)
|
||||
add_cxx_compile_options(-Wno-user-defined-literals)
|
||||
add_cxx_compile_options(-Wno-vla-cxx-extension)
|
||||
add_cxx_compile_options(-Wno-unqualified-std-cast-call)
|
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
# Only ignore expansion-to-defined for g++, clang's implementation doesn't complain about function-like macros
|
||||
add_cxx_compile_options(-Wno-expansion-to-defined)
|
||||
|
@ -91,6 +92,7 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$" AND CMAKE_CXX_SIMULATE_ID MATCHES "MSVC")
|
||||
add_cxx_compile_options(-Wno-reserved-identifier)
|
||||
add_cxx_compile_options(-Wno-user-defined-literals)
|
||||
add_cxx_compile_options(-Wno-unqualified-std-cast-call)
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
|
||||
# TODO: this seems wrong, but we use this kind of code too much
|
||||
|
|
Loading…
Reference in a new issue