summaryrefslogtreecommitdiff
path: root/media-gfx/openscad-2019.05-r2/openscad-cgal-5.patch
blob: 38280da36bb90565f2545fc8cbaf190303397c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
From 9c4d5ae7ab05afaa38d4d640e5c4fdbe64f1d74b Mon Sep 17 00:00:00 2001
From: Torsten Paul <Torsten.Paul@gmx.de>
Date: Fri, 25 Oct 2019 17:13:56 +0200
Subject: [PATCH] Update to C++14 (needed by CGAL >= 5.0).
 
---
 c++11.pri => c++std.pri | 21 ++++++++-------------
 common.pri              |  2 +-
 openscad.pro            |  2 +-
 3 files changed, 10 insertions(+), 15 deletions(-)
 rename c++11.pri => c++std.pri (74%)
 
diff --git a/c++11.pri b/c++std.pri
similarity index 74%
rename from c++11.pri
rename to c++std.pri
index 0a2c3b6a0f..aac656d6d9 100644
--- a/c++11.pri
+++ b/c++std.pri
@@ -4,16 +4,16 @@ macx {
   dirs = $${BOOSTDIR} $${QMAKE_LIBDIR}
   for(dir, dirs) {
     system(otool -L $${dir}/libboost_thread*  | grep libc++ >& /dev/null ) {
-      message("Using libc++11")
+      message("Using libc++")
       CONFIG += libc++
     }
     else {
       message("Using libstdc++")
       CONFIG += libstdc++
-      c++11 {
-        # libc++ is a requirement for using C++11 
-        warning("Disabling C++11 since libstdc++ dependencies were found")
-        CONFIG -= c++11
+      c++std {
+        # libc++ is a requirement for using C++14 
+        warning("Disabling C++14 since libstdc++ dependencies were found")
+        CONFIG -= c++std
       }
     }
   }
@@ -25,9 +25,9 @@ macx {
   }
 }
 
-c++11 {
-  QMAKE_CXXFLAGS += -std=c++11
-  message("Using C++11")
+c++std {
+  QMAKE_CXXFLAGS += -std=c++14
+  message("Using C++14")
 
   *clang*: {
       # 3rd party libraries will probably violate this for a long time
@@ -41,8 +41,3 @@ c++11 {
     QMAKE_OBJECTIVE_CFLAGS_WARN_ON += $$CXX11_SUPPRESS_WARNINGS
   }
 }
-else {
-  *clang* {
-    QMAKE_CXXFLAGS_WARN_ON += -Wno-c++11-extensions
-  }
-}
diff --git a/common.pri b/common.pri
index 1110757014..d1d5edc8dd 100644
--- a/common.pri
+++ b/common.pri
@@ -30,4 +30,4 @@ include(win.pri)
 include(flex.pri)
 include(bison.pri)
 include(opengl.pri)
-include(c++11.pri)
+include(c++std.pri)
diff --git a/openscad.pro b/openscad.pro
index c5897aef79..c19f8acbd6 100755
--- a/openscad.pro
+++ b/openscad.pro
@@ -177,7 +177,7 @@ skip-version-check {
 isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config
 
 # Application configuration
-CONFIG += c++11
+CONFIG += c++std
 CONFIG += cgal
 CONFIG += opencsg
 CONFIG += glew