summaryrefslogtreecommitdiff
path: root/debian/patches/0001-Stash-flags.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/0001-Stash-flags.patch')
-rw-r--r--debian/patches/0001-Stash-flags.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/0001-Stash-flags.patch b/debian/patches/0001-Stash-flags.patch
new file mode 100644
index 00000000..db45a7e6
--- /dev/null
+++ b/debian/patches/0001-Stash-flags.patch
@@ -0,0 +1,32 @@
+From: Gard Spreemann <gspreemann@gmail.com>
+Date: Thu, 13 Oct 2016 15:43:54 +0200
+Subject: Stash flags.
+
+---
+ CMakeLists.txt | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index cde949e..a1b39c3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -36,6 +36,8 @@ else()
+ # A fix would be to use https://cmake.org/cmake/help/v3.1/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
+ # or even better https://cmake.org/cmake/help/v3.1/variable/CMAKE_CXX_STANDARD.html
+ # but it implies to use cmake version 3.1 at least.
++ set(STASH_CXXFLAGS "${CMAKE_CXX_FLAGS}")
++ set(STASH_LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
+
+ # find CGAL in QUIET mode for cmake to be less verbose when CGAL is not found.
+ find_package(CGAL QUIET)
+@@ -53,8 +55,9 @@ else()
+ # Turn off some VC++ warnings
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267 /wd4668 /wd4311 /wd4800 /wd4820 /wd4503 /wd4244 /wd4345 /wd4996 /wd4396 /wd4018")
+ else()
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wpedantic -Wsign-compare")
++ set(CMAKE_CXX_FLAGS "-std=c++11 ${STASH_CXXFLAGS}")
+ endif()
++ set(CMAKE_SHARED_LINKER_FLAGS "${STASH_LDFLAGS}")
+
+ if(CMAKE_BUILD_TYPE MATCHES Debug)
+ message("++ Debug compilation flags are: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")