This commit is contained in:
Alex Beregszaszi 2021-05-19 12:05:29 +01:00
parent ed9d5adf5d
commit 6a7535afe6

View File

@ -24,22 +24,6 @@ if(NOT EMSCRIPTEN)
endif()
endif()
cable_add_compile_options(
IF_SUPPORTED
-Wimplicit-fallthrough
# Prevent the path of the source directory from ending up in the binary via __FILE__ macros.
-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=/solidity
# -Wpessimizing-move warns when a call to std::move would prevent copy elision
# if the argument was not wrapped in a call. This happens when moving a local
# variable in a return statement when the variable is the same type as the
# return type or using a move to create a new object from a temporary object.
-Wpessimizing-move
# -Wredundant-move warns when an implicit move would already be made, so the
# std::move call is not needed, such as when moving a local variable in a return
# that is different from the return type.
-Wredundant-move
)
if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang"))
# Enables all the warnings about constructions that some users consider questionable,
# and that are easy to avoid. Also enable some extra warning flags that are not
@ -64,6 +48,10 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA
-Wduplicate-enum
-Wlogical-op
-Wno-unknown-attributes
-Wpessimizing-move
-Wredundant-move
# Prevent the path of the source directory from ending up in the binary via __FILE__ macros.
-fmacro-prefix-map=${CMAKE_SOURCE_DIR}=/solidity
)
# Configuration-specific compiler settings.