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 a09e413fb6
commit 86e1779140

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()