2020-08-08 17:52:50 +08:00
|
|
|
From d770dfea36dcbe8d63ad0819e796d180ab2ea638 Mon Sep 17 00:00:00 2001
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
cmake/build_configurations/compiler_options.cmake | 2 ++
|
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
2020-03-18 13:41:46 +08:00
|
|
|
diff --git a/cmake/build_configurations/compiler_options.cmake b/cmake/build_configurations/compiler_options.cmake
|
2020-08-08 17:52:50 +08:00
|
|
|
index a319983..aea15a3 100644
|
2020-03-18 13:41:46 +08:00
|
|
|
--- a/cmake/build_configurations/compiler_options.cmake
|
|
|
|
|
+++ b/cmake/build_configurations/compiler_options.cmake
|
2020-08-08 17:52:50 +08:00
|
|
|
@@ -45,6 +45,7 @@ IF(UNIX)
|
2020-03-18 13:41:46 +08:00
|
|
|
# Default GCC flags
|
2020-08-08 17:52:50 +08:00
|
|
|
IF(MY_COMPILER_IS_GNU)
|
2020-03-18 13:41:46 +08:00
|
|
|
SET(COMMON_C_FLAGS "-fno-omit-frame-pointer")
|
|
|
|
|
+ SET(COMMON_C_FLAGS "-fstack-protector-strong")
|
|
|
|
|
# Disable inline optimizations for valgrind testing to avoid false positives
|
|
|
|
|
IF(WITH_VALGRIND)
|
|
|
|
|
STRING_PREPEND(COMMON_C_FLAGS "-fno-inline ")
|
2020-08-08 17:52:50 +08:00
|
|
|
@@ -55,6 +56,7 @@ IF(UNIX)
|
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
|
|
SET(COMMON_CXX_FLAGS "-std=c++14 -fno-omit-frame-pointer")
|
2020-03-18 13:41:46 +08:00
|
|
|
+ SET(COMMON_CXX_FLAGS "-fstack-protector-strong")
|
|
|
|
|
# Disable inline optimizations for valgrind testing to avoid false positives
|
|
|
|
|
IF(WITH_VALGRIND)
|
|
|
|
|
STRING_PREPEND(COMMON_CXX_FLAGS "-fno-inline ")
|
2020-08-08 17:52:50 +08:00
|
|
|
--
|
|
|
|
|
2.23.0
|
|
|
|
|
|