Build: Fix CMake to pass -Wwrite-string compiler flag if enabled

This commit is contained in:
David Cermak 2021-06-03 12:58:44 +02:00 committed by bot
parent e3df8293a9
commit fcf1419626

View File

@ -74,6 +74,10 @@ if(CONFIG_COMPILER_DISABLE_GCC8_WARNINGS)
"-Wno-int-in-bool-context")
endif()
if(CONFIG_COMPILER_WARN_WRITE_STRINGS)
list(APPEND compile_options "-Wwrite-strings")
endif()
if(CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE)
list(APPEND compile_definitions "-DNDEBUG")
endif()