mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user