aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2025-03-21 16:04:59 +0100
committerPierre Ossman <ossman@cendio.se>2025-03-21 16:04:59 +0100
commit8d585023108c7f32ffa814c4a045b0133111f6bb (patch)
tree7c7adb7c510fd8605a89e15398c0025918ab0b88
parent48ebcba910f7b4be3b3581bf630d5c744be8cbda (diff)
downloadtigervnc-8d585023108c7f32ffa814c4a045b0133111f6bb.tar.gz
tigervnc-8d585023108c7f32ffa814c4a045b0133111f6bb.zip
Always build with _FORTIFY_SOURCEHEADmaster
This is already enabled in Ubuntu and RPM builds, so we might as well enable it everywhere so all developers and users see the same behaviour.
-rw-r--r--CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 75773460..0c0344df 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -75,6 +75,7 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
# Tell the compiler to be stringent
+add_compile_definitions(_FORTIFY_SOURCE=2)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wformat=2 -Wvla")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant")