From fb6e3cd2a3b7e7d3f89218955bd30aea2fe764ef Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 6 Jun 2025 00:08:54 +0800 Subject: [PATCH] now is supported the Security Development Lifecycle (SDL) --- compiler.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/compiler.cmake b/compiler.cmake index 07b1d42..6802a91 100644 --- a/compiler.cmake +++ b/compiler.cmake @@ -23,6 +23,13 @@ IF(WIN32) OPTION(MSVC_USE_fsanitize "USE fsanitize" OFF) + OPTION(MSVC_USE_SecurityDevlopmentLiftCycle "use Security Development Lifecycle (SDL)" OFF) + + if(MSVC_USE_SecurityDevlopmentLiftCycle) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /sdl") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /sdl") + endif() + if(MSVC_USE_fsanitize) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fsanitize=address")