summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-03-06 16:54:33 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-03-06 16:54:33 +0000
commit306f0fea624557926ebbd67be0c943e1aa0139e9 (patch)
tree4634526366f6871cf8eacd314957d28f3aeabc8d
parentDo partial convert flowed text to tspan if possible (diff)
downloadinkscape-306f0fea624557926ebbd67be0c943e1aa0139e9.tar.gz
inkscape-306f0fea624557926ebbd67be0c943e1aa0139e9.zip
Improve Debug building
- add -O1 to make FORTIFY_SOURCE happy (eliminate compiler warnings) - canonicalize CMAKE_CXX_FLAGS_DEBUG to avoid unnecessary recompilation Both issues were introduced with f7fc3d3a7f8f51a01cd1dfb261c3e234617e092e
-rw-r--r--CMakeLists.txt2
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake1
2 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d6d93b12..7f613d137 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -203,6 +203,8 @@ endif()
include(CMakeScripts/CanonicalizeFlagsVar.cmake)
canonicalize_flags_var("${CMAKE_CXX_FLAGS}" _new_cxx)
set(CMAKE_CXX_FLAGS "${_new_cxx}" CACHE STRING "" FORCE)
+canonicalize_flags_var("${CMAKE_CXX_FLAGS_DEBUG}" _new_cxx)
+set(CMAKE_CXX_FLAGS_DEBUG "${_new_cxx}" CACHE STRING "" FORCE)
# message(FATAL_ERROR "CMAKE_CXX_FLAGS = <${CMAKE_CXX_FLAGS}>")
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 4cb63aae8..6a842654c 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -23,6 +23,7 @@ list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format") # e.g.: printf("
list(APPEND INKSCAPE_CXX_FLAGS "-Werror=format-security") # e.g.: printf(variable);
list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-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")