Description: Make cmake adds a fortify source C++ flag
 cmake doesn't understand debian's common way to export C/C++ flags, so let's
 include the fortify source hardening flag manually.
Author: Santiago Ruano Rincón <santiago@freexian.com>
Last-Update: 2025-03-13
Bug: https://gitlab.com/tango-controls/pytango/-/issues/671

Index: pytango/CMakeLists.txt
===================================================================
--- pytango.orig/CMakeLists.txt
+++ pytango/CMakeLists.txt
@@ -13,6 +13,10 @@ project(
     LANGUAGES CXX
 )
 
+if(NOT WIN32)
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORTIFY_SOURCE=3")
+endif()
+
 include(cmake/project-is-top-level.cmake)
 
 # ---- Dependencies -------
