summaryrefslogtreecommitdiffstats
path: root/CMakeScripts/DefineDependsandFlags.cmake
diff options
context:
space:
mode:
authorPatrick Storz <eduard.braun2@gmx.de>2019-03-31 20:25:19 +0000
committerPatrick Storz <eduard.braun2@gmx.de>2019-03-31 20:25:19 +0000
commitc523de13b39a2bb128569ba5816af06e52d368d7 (patch)
treec9c675092c9875b4e9c88e19ffec706ed8ecf06a /CMakeScripts/DefineDependsandFlags.cmake
parentCMake: Avoid defining _FORTIFY_SOURCE twice in separate places (diff)
downloadinkscape-c523de13b39a2bb128569ba5816af06e52d368d7.tar.gz
inkscape-c523de13b39a2bb128569ba5816af06e52d368d7.zip
CMake: Use CMAKE_CXX_STANDARD and don't set it in three places
This requires bumping cmake version requirement to 3.1 (which should long be available on supported platforms, though) TODO: We actually depend on GNU compiler extensions right now (i.e. *don't* build with -std=c++11 but require -std=gnu++11)
Diffstat (limited to '')
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake9
1 files changed, 1 insertions, 8 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 09362da7d..8099f0997 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -10,14 +10,6 @@ list(APPEND INKSCAPE_INCS ${PROJECT_SOURCE_DIR}
${CMAKE_BINARY_DIR}/include
)
-# ----------------------------------------------------------------------------
-# Add C++11 standard compliance
-# TODO: Add a proper check for compiler compliance here
-# ----------------------------------------------------------------------------
-# this can be removed when cmake minimum is 3.1
-# as replaced with CMAKE_CXX_STANDARD in main CMakeLists.txt
-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);
@@ -29,6 +21,7 @@ if (CMAKE_COMPILER_IS_GNUCC)
list(APPEND INKSCAPE_CXX_FLAGS_DEBUG "-fstack-clash-protection -fcf-protection")
endif()
endif()
+
# Define the flags for profiling if desired:
if(WITH_PROFILING)
set(BUILD_SHARED_LIBS off)