summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2023-07-08 17:12:39 +0200
committerSébastien Helleu <flashcode@flashtux.org>2023-07-08 17:12:39 +0200
commit3070c12fa388f238edab7677f401bb2761002fbb (patch)
treef61004b74b2bc997977d3306a05363bb4e8279e1
parent1d5433485ce976c8554ee8f72951c077344d0c70 (diff)
downloadweechat-3070c12fa388f238edab7677f401bb2761002fbb.zip
build: add C compiler options "-Wformat" and "-Werror=format-security"
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fcccc5640..aba92ce5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -29,7 +29,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
set(CMAKE_SKIP_RPATH ON)
# compiler options
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char -fms-extensions -Wall -Wextra -Werror-implicit-function-declaration")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsigned-char -fms-extensions -Wall -Wextra -Werror-implicit-function-declaration -Wformat -Werror=format-security")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char -fms-extensions -Wall -Wextra")
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
# extra options specific to gcc/g++