mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
MDEV-34408: Facilitate the addition of warnings into the build system
Create a MY_WARNING_FLAGS_NON_FATAL for testing warnings Add -Weffc++ as no-error espect, disabling from rocksdb due to excessive errors that will be corrected later.
This commit is contained in:
parent
78d7bb1d27
commit
971a0ba23c
2 changed files with 11 additions and 0 deletions
|
@ -41,10 +41,20 @@ SET(MY_WARNING_FLAGS
|
|||
-Wwrite-strings
|
||||
)
|
||||
|
||||
# Warning flags that are in testing before moving
|
||||
# to MY_WARNING_FLAGS if stable.
|
||||
SET(MY_WARNING_FLAGS_NON_FATAL
|
||||
effc++
|
||||
)
|
||||
|
||||
FOREACH(F ${MY_WARNING_FLAGS})
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG(${F} DEBUG RELWITHDEBINFO)
|
||||
ENDFOREACH()
|
||||
|
||||
FOREACH(F ${MY_WARNING_FLAGS_NON_FATAL})
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG(-Wno-error=${F} DEBUG RELWITHDEBINFO)
|
||||
ENDFOREACH()
|
||||
|
||||
SET(MY_ERROR_FLAGS -Werror -fno-operator-names)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0")
|
||||
|
|
|
@ -10,6 +10,7 @@ SET(CPACK_RPM_rocksdb-engine_PACKAGE_DESCRIPTION "The RocksDB storage engine is
|
|||
at maximising storage efficiency while maintaining InnoDB-like performance." PARENT_SCOPE)
|
||||
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG(-Wno-range-loop-construct)
|
||||
MY_CHECK_AND_SET_COMPILER_FLAG(-Wno-effc++ DEBUG RELWITHDEBINFO)
|
||||
|
||||
MACRO(SKIP_ROCKSDB_PLUGIN msg)
|
||||
MESSAGE_ONCE(SKIP_ROCKSDB_PLUGIN "Can't build rocksdb engine - ${msg}")
|
||||
|
|
Loading…
Reference in a new issue