diff options
-rw-r--r-- | cmake/EthCompilerSettings.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/EthCompilerSettings.cmake b/cmake/EthCompilerSettings.cmake index 97db9168..ea3b185a 100644 --- a/cmake/EthCompilerSettings.cmake +++ b/cmake/EthCompilerSettings.cmake @@ -65,7 +65,7 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA # Build everything as shared libraries (.so files) add_definitions(-DSHAREDLIB) - + # If supported for the target machine, emit position-independent code, suitable for dynamic # linking and avoiding any limit on the size of the global offset table. add_compile_options(-fPIC) @@ -94,6 +94,12 @@ if (("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") OR ("${CMAKE_CXX_COMPILER_ID}" MA add_compile_options(-fstack-protector) endif() + # Until https://github.com/ethereum/solidity/issues/2479 is handled + # disable all implicit fallthrough warnings in the codebase for GCC > 7.0 + if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0) + add_compile_options(-Wno-implicit-fallthrough) + endif() + # Additional Clang-specific compiler settings. elseif ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") |