summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-03-31 20:01:44 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-03-31 20:01:44 +0000
commit87e8769643ede4e5932949f5565d51085eeeb58f (patch)
treec3414c4eae7654bcb6f408ecdd968989258e1bcb /CMakeScripts
parentSome anti-aliasing (diff)
downloadinkscape-87e8769643ede4e5932949f5565d51085eeeb58f.tar.gz
inkscape-87e8769643ede4e5932949f5565d51085eeeb58f.zip
CMake: Avoid defining _FORTIFY_SOURCE twice in separate places
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake12
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index c87345552..09362da7d 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -21,13 +21,13 @@ list(APPEND INKSCAPE_CXX_FLAGS "-std=c++11")
# Errors for common mistakes
list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format") # e.g.: printf("%s", std::string("foo"))
list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format-security") # e.g.: printf(variable);
-list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-D_FORTIFY_SOURCE=2")
+list(APPEND INKSCAPE_CXX_FLAGS "-D_FORTIFY_SOURCE=2")
if (CMAKE_COMPILER_IS_GNUCC)
-list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-Og") # for _FORTIFY_SOURCE
-list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables")
-if(CXX_COMPILER_VERSION VERSION_GREATER 8.0)
-list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fstack-clash-protection -fcf-protection")
-endif()
+ list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-Og") # for _FORTIFY_SOURCE
+ list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables")
+ if(CXX_COMPILER_VERSION VERSION_GREATER 8.0)
+ list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fstack-clash-protection -fcf-protection")
+ endif()
endif()
# Define the flags for profiling if desired:
if(WITH_PROFILING)