|
|
@ -118,23 +118,25 @@ if (MSVC AND NOT CXX_CLANG) |
|
|
else() |
|
|
else() |
|
|
if (NOT MSVC) |
|
|
if (NOT MSVC) |
|
|
add_compile_options( |
|
|
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() |
|
|
endif() |
|
|
|
|
|
|
|
|
add_compile_options( |
|
|
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 |
|
|
# iOS clang doesn't like this specific option |
|
|
if (NOT IOS) |
|
|
if (NOT IOS) |
|
|
@ -144,16 +146,16 @@ else() |
|
|
if (CXX_CLANG OR CXX_ICC OR CXX_APPLE) # Clang, AppleClang, or Intel C++ |
|
|
if (CXX_CLANG OR CXX_ICC OR CXX_APPLE) # Clang, AppleClang, or Intel C++ |
|
|
if (NOT MSVC) |
|
|
if (NOT MSVC) |
|
|
add_compile_options( |
|
|
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() |
|
|
endif() |
|
|
|
|
|
|
|
|
add_compile_options( |
|
|
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() |
|
|
endif() |
|
|
|
|
|
|
|
|
@ -170,9 +172,9 @@ else() |
|
|
# These diagnostics would be great if they worked, but are just completely broken |
|
|
# These diagnostics would be great if they worked, but are just completely broken |
|
|
# and produce bogus errors on external libraries like fmt. |
|
|
# and produce bogus errors on external libraries like fmt. |
|
|
add_compile_options( |
|
|
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() |
|
|
endif() |
|
|
|
|
|
|
|
|
@ -261,6 +263,7 @@ endif() |
|
|
|
|
|
|
|
|
if (IOS) |
|
|
if (IOS) |
|
|
add_subdirectory(ios) |
|
|
add_subdirectory(ios) |
|
|
|
|
|
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-Wno-error>) |
|
|
endif() |
|
|
endif() |
|
|
|
|
|
|
|
|
include(GenerateDepHashes) |
|
|
include(GenerateDepHashes) |