From acb9ec8b46b5b5e9034205bdb43f8c0e1f9e99d7 Mon Sep 17 00:00:00 2001
From: Henry Weller <http://cfd.direct>
Date: Sun, 10 Jan 2016 19:17:31 +0000
Subject: [PATCH] wmake/rules: Add -std=c++0x to formally enable support for of
 C++11 features The c++0x is used rather than c++11 to support gcc-4.5.?

---
 .../PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt       | 1 +
 .../PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt        | 1 +
 wmake/rules/linux64Clang/c++                                    | 2 +-
 wmake/rules/linux64Gcc/c++                                      | 2 +-
 wmake/rules/linuxARM7Gcc/c++                                    | 2 +-
 wmake/rules/linuxClang/c++                                      | 2 +-
 wmake/rules/linuxGcc/c++                                        | 2 +-
 wmake/rules/linuxIA64Gcc/c++                                    | 2 +-
 wmake/rules/linuxIA64Icc/c++                                    | 2 +-
 wmake/rules/linuxPPC64Gcc/c++                                   | 2 +-
 wmake/rules/linuxPPC64leGcc/c++                                 | 2 +-
 wmake/rules/solaris64Gcc/c++                                    | 2 +-
 wmake/rules/solarisGcc/c++                                      | 2 +-
 13 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
index 65c25ae5072..96ed7021fed 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt
@@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(
 )
 
 ADD_DEFINITIONS(
+    -std=c++0x
     -DWM_$ENV{WM_PRECISION_OPTION}
     -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
 )
diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
index d081db2ff6c..e15613a51f1 100644
--- a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
+++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt
@@ -25,6 +25,7 @@ INCLUDE_DIRECTORIES(
 )
 
 ADD_DEFINITIONS(
+    -std=c++0x
     -DWM_$ENV{WM_PRECISION_OPTION}
     -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
 )
diff --git a/wmake/rules/linux64Clang/c++ b/wmake/rules/linux64Clang/c++
index f7d8a111ebc..2e09ff8827d 100644
--- a/wmake/rules/linux64Clang/c++
+++ b/wmake/rules/linux64Clang/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-tautological-undefined-compare -Wno-shift-negative-value
 
-CC          = clang++ -m64
+CC          = clang++ -std=c++0x -m64
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++
index a3246efdd42..7c7af702e28 100644
--- a/wmake/rules/linux64Gcc/c++
+++ b/wmake/rules/linux64Gcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m64
+CC          = g++ -std=c++0x -m64
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linuxARM7Gcc/c++ b/wmake/rules/linuxARM7Gcc/c++
index 076934eae82..b647cc85e66 100644
--- a/wmake/rules/linuxARM7Gcc/c++
+++ b/wmake/rules/linuxARM7Gcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++
+CC          = g++ -std=c++0x
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++
index 9d1ecb74823..216cc67f7bf 100644
--- a/wmake/rules/linuxClang/c++
+++ b/wmake/rules/linuxClang/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedef -Wno-tautological-undefined-compare -Wno-shift-negative-value
 
-CC          = clang++ -m32
+CC          = clang++ -std=c++0x -m32
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linuxGcc/c++ b/wmake/rules/linuxGcc/c++
index 9e2be6d7391..b115000d956 100644
--- a/wmake/rules/linuxGcc/c++
+++ b/wmake/rules/linuxGcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m32
+CC          = g++ -std=c++0x -m32
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linuxIA64Gcc/c++ b/wmake/rules/linuxIA64Gcc/c++
index ada728b3fb3..d07854e0640 100644
--- a/wmake/rules/linuxIA64Gcc/c++
+++ b/wmake/rules/linuxIA64Gcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++
+CC          = g++ -std=c++0x
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linuxIA64Icc/c++ b/wmake/rules/linuxIA64Icc/c++
index 831d3cc1edc..4d24538e976 100644
--- a/wmake/rules/linuxIA64Icc/c++
+++ b/wmake/rules/linuxIA64Icc/c++
@@ -6,7 +6,7 @@ c++WARN     = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invali
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -diag-disable 1224,2026,2305
 
-CC          = icpc
+CC          = icpc -std=c++0x
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linuxPPC64Gcc/c++ b/wmake/rules/linuxPPC64Gcc/c++
index e8e862bd26c..c5dcaa4d960 100644
--- a/wmake/rules/linuxPPC64Gcc/c++
+++ b/wmake/rules/linuxPPC64Gcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m64 -mcpu=power5+
+CC          = g++ -std=c++0x -m64 -mcpu=power5+
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/linuxPPC64leGcc/c++ b/wmake/rules/linuxPPC64leGcc/c++
index 284007b730e..76c49471833 100644
--- a/wmake/rules/linuxPPC64leGcc/c++
+++ b/wmake/rules/linuxPPC64leGcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
 
-CC          = g++ -m64 -mcpu=power8
+CC          = g++ -std=c++0x -m64 -mcpu=power8
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/solaris64Gcc/c++ b/wmake/rules/solaris64Gcc/c++
index 33c22305fe9..e7f16f4d46f 100644
--- a/wmake/rules/solaris64Gcc/c++
+++ b/wmake/rules/solaris64Gcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN =
 
-CC          = g++ -m64
+CC          = g++ -std=c++0x -m64
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
diff --git a/wmake/rules/solarisGcc/c++ b/wmake/rules/solarisGcc/c++
index ec5a6ef39e6..d6bf189010d 100644
--- a/wmake/rules/solarisGcc/c++
+++ b/wmake/rules/solarisGcc/c++
@@ -5,7 +5,7 @@ c++WARN     = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
 # Suppress some warnings for flex++ and CGAL
 c++LESSWARN =
 
-CC          = g++
+CC          = g++ -std=c++0x
 
 include $(RULES)/c++$(WM_COMPILE_OPTION)
 
-- 
GitLab