代码拉取完成,页面将自动刷新
From 4cf6dc9f628fc2c5b3478d70e15d4fab8a32ae86 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Wed, 10 Apr 2024 11:43:51 +0800
Subject: [PATCH] add secure compile option
Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
CMakeLists.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4137ce2..d17f09d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,9 @@
# to 3.26.
cmake_minimum_required(VERSION 3.10...3.26)
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-z,now -fstack-check -fPIE")
+set(CMAKE_EXE_LINKER_FLAGS "-pie")
+
# Revert to old behavior for MSVC debug symbols.
if(POLICY CMP0141)
cmake_policy(SET CMP0141 OLD)
--
2.25.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。