File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -55,6 +55,7 @@ option(SILKWORM_CLANG_TIDY "Clang-Tidy linter" OFF)
5555option (SILKWORM_SANITIZE "Build instrumentation for sanitizers" OFF )
5656option (SILKWORM_FUZZER "Build instrumentation for fuzzers" OFF )
5757option (SILKWORM_USE_MIMALLOC "Enable using mimalloc for dynamic memory management" ON )
58+ option (SILKWORM_ALLOW_UNUSED_VAR_WARNINGS "Turn unused variable errors into warnings" OFF )
5859
5960if (NOT SILKWORM_HAS_PARENT)
6061 include (cmake/conan.cmake)
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ elseif((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MAT
3333 add_compile_options (-Wtype-limits -Wformat=2)
3434 add_compile_options (-Wno-missing-field-initializers)
3535
36+ if (SILKWORM_ALLOW_UNUSED_VAR_WARNINGS)
37+ add_compile_options (-Wno-error=unused-parameter)
38+ add_compile_options (-Wno-error=unused-variable )
39+ endif ()
40+
3641 if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
3742 add_compile_options (-Wduplicated-cond -Wduplicated-branches -Wlogical-op)
3843 add_compile_options (-Wno-attributes)
You can’t perform that action at this time.
0 commit comments