mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 20:38:57 +02:00
use language generator exprs
This commit is contained in:
parent
bb3dc3f315
commit
2f2ee7c4a0
4 changed files with 41 additions and 35 deletions
|
|
@ -399,9 +399,12 @@ if (Boost_ADDED)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthreads")
|
||||
endif()
|
||||
|
||||
target_compile_options(boost_heap INTERFACE -Wno-shadow)
|
||||
target_compile_options(boost_icl INTERFACE -Wno-shadow)
|
||||
target_compile_options(boost_asio INTERFACE -Wno-conversion -Wno-implicit-fallthrough)
|
||||
target_compile_options(boost_heap INTERFACE $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-shadow>)
|
||||
target_compile_options(boost_icl INTERFACE $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-shadow>)
|
||||
target_compile_options(boost_asio INTERFACE
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-conversion>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-implicit-fallthrough>
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
10
externals/CMakeLists.txt
vendored
10
externals/CMakeLists.txt
vendored
|
|
@ -114,11 +114,11 @@ if(ENABLE_CUBEB)
|
|||
|
||||
set_target_properties(cubeb PROPERTIES COMPILE_OPTIONS "")
|
||||
target_compile_options(cubeb INTERFACE
|
||||
-Wno-implicit-const-int-float-conversion
|
||||
-Wno-shadow
|
||||
-Wno-missing-declarations
|
||||
-Wno-return-type
|
||||
-Wno-uninitialized
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-implicit-const-int-float-conversion>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-shadow>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-missing-declarations>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-return-type>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-uninitialized>
|
||||
)
|
||||
else()
|
||||
target_compile_options(cubeb PRIVATE
|
||||
|
|
|
|||
|
|
@ -118,23 +118,25 @@ if (MSVC AND NOT CXX_CLANG)
|
|||
else()
|
||||
if (NOT MSVC)
|
||||
add_compile_options(
|
||||
-fwrapv
|
||||
-fno-rtti # Disable RTTI
|
||||
-pipe
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-fwrapv>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-pipe>
|
||||
)
|
||||
# c++ only
|
||||
add_compile_options(
|
||||
$<$<COMPILE_LANGUAGE:CXX>:-fno-rtti # Disable RTTI
|
||||
)
|
||||
endif()
|
||||
|
||||
add_compile_options(
|
||||
-Werror=all
|
||||
-Werror=extra
|
||||
-Werror=missing-declarations
|
||||
-Werror=shadow
|
||||
-Werror=unused
|
||||
|
||||
-Wno-attributes
|
||||
-Wno-invalid-offsetof
|
||||
-Wno-unused-parameter
|
||||
-Wno-missing-field-initializers
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wall>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Werror>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wextra>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=shadow>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=unused>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-attributes>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-invalid-offsetof>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-parameter>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-missing-field-initializers>
|
||||
)
|
||||
# iOS clang doesn't like this specific option
|
||||
if (NOT IOS)
|
||||
|
|
@ -144,16 +146,16 @@ else()
|
|||
if (CXX_CLANG OR CXX_ICC OR CXX_APPLE) # Clang, AppleClang, or Intel C++
|
||||
if (NOT MSVC)
|
||||
add_compile_options(
|
||||
-Werror=shadow-uncaptured-local
|
||||
-Werror=implicit-fallthrough
|
||||
-Werror=type-limits
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=shadow-uncaptured-local>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=implicit-fallthrough>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Werror=type-limits>
|
||||
)
|
||||
endif()
|
||||
|
||||
add_compile_options(
|
||||
-Wno-braced-scalar-init
|
||||
-Wno-unused-private-field
|
||||
-Wno-nullability-completeness
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-braced-scalar-init>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-private-field>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-nullability-completeness>
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
@ -170,9 +172,9 @@ else()
|
|||
# These diagnostics would be great if they worked, but are just completely broken
|
||||
# and produce bogus errors on external libraries like fmt.
|
||||
add_compile_options(
|
||||
-Wno-array-bounds
|
||||
-Wno-stringop-overread
|
||||
-Wno-stringop-overflow
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-array-bounds>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-stringop-overread>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-stringop-overflow>
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
@ -261,6 +263,7 @@ endif()
|
|||
|
||||
if (IOS)
|
||||
add_subdirectory(ios)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wno-error>)
|
||||
endif()
|
||||
|
||||
include(GenerateDepHashes)
|
||||
|
|
|
|||
|
|
@ -363,14 +363,14 @@ else()
|
|||
if (APPLE)
|
||||
# error: declaration shadows a typedef in 'interval_base_set<SubType, DomainT, Compare, Interval, Alloc>'
|
||||
# error: implicit conversion loses integer precision: 'int' to 'boost::icl::bound_type' (aka 'unsigned char')
|
||||
target_compile_options(video_core PRIVATE -Wno-shadow -Wno-unused-local-typedef)
|
||||
target_compile_options(video_core PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-shadow>
|
||||
$<$<COMPILE_LANGUAGE:C,CXX>:-Wno-unused-local-typedef>
|
||||
)
|
||||
else()
|
||||
target_compile_options(video_core PRIVATE -Werror=conversion)
|
||||
endif()
|
||||
|
||||
target_compile_options(video_core PRIVATE
|
||||
-Wno-sign-conversion
|
||||
)
|
||||
target_compile_options(video_core PRIVATE $<$<COMPILE_LANGUAGE:C,CXX>:-Wno-sign-conversion>)
|
||||
|
||||
# xbyak
|
||||
set_source_files_properties(macro/macro_jit_x64.cpp PROPERTIES COMPILE_OPTIONS "-Wno-conversion;-Wno-shadow")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue