From 0257ab14596f658708b4164963bcd5b5d654efc2 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 23 Jul 2020 15:31:07 +0100 Subject: [PATCH] Updated to C++14 standard gcc version 5 and above and clang version 3.4 and above fully support the C++14 standard and the compilation rules of OpenFOAM-dev now require this support allowing for further development and maintenance to benefit from the additional language features provided in C++14. --- .../graphics/PVReaders/PVFoamReader/CMakeLists.txt | 2 +- .../graphics/PVReaders/PVblockMeshReader/CMakeLists.txt | 2 +- wmake/rules/linux64Clang/c++ | 2 +- wmake/rules/linux64Gcc/c++ | 2 +- wmake/rules/linux64GccKNL/c++ | 2 +- wmake/rules/linux64Icc/c++ | 2 +- wmake/rules/linux64IccKNL/c++ | 2 +- wmake/rules/linuxARM7Gcc/c++ | 2 +- wmake/rules/linuxArm64Gcc/c++ | 2 +- wmake/rules/linuxClang/c++ | 2 +- wmake/rules/linuxGcc/c++ | 2 +- wmake/rules/linuxIcc/c++ | 2 +- wmake/rules/linuxPPC64Gcc/c++ | 2 +- wmake/rules/linuxPPC64leGcc/c++ | 2 +- wmake/rules/solaris64Gcc/c++ | 2 +- wmake/rules/solarisGcc/c++ | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt index e88e8d35dd..be076a7f93 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVFoamReader/CMakeLists.txt @@ -30,7 +30,7 @@ INCLUDE_DIRECTORIES( ) ADD_DEFINITIONS( - -std=c++11 + -std=c++14 -DWM_$ENV{WM_PRECISION_OPTION} -DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE} ) diff --git a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt index e5e2952519..e4f4bca62b 100644 --- a/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PVReaders/PVblockMeshReader/CMakeLists.txt @@ -29,7 +29,7 @@ INCLUDE_DIRECTORIES( ) ADD_DEFINITIONS( - -std=c++11 + -std=c++14 -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 014eff3461..f6a94408e2 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++ -std=c++11 -m64 +CC = clang++ -std=c++14 -m64 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linux64Gcc/c++ b/wmake/rules/linux64Gcc/c++ index ca33d452d2..a3e16fd643 100644 --- a/wmake/rules/linux64Gcc/c++ +++ b/wmake/rules/linux64Gcc/c++ @@ -6,7 +6,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++ -std=c++11 -m64 +CC = g++ -std=c++14 -m64 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linux64GccKNL/c++ b/wmake/rules/linux64GccKNL/c++ index cb308e8107..0487d5bb95 100644 --- a/wmake/rules/linux64GccKNL/c++ +++ b/wmake/rules/linux64GccKNL/c++ @@ -6,7 +6,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++ -std=c++11 -m64 -march=knl -DvectorMachine +CC = g++ -std=c++14 -m64 -march=knl -DvectorMachine include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linux64Icc/c++ b/wmake/rules/linux64Icc/c++ index 0f48796fa0..6f9b81c780 100644 --- a/wmake/rules/linux64Icc/c++ +++ b/wmake/rules/linux64Icc/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 -std=c++11 -fp-trap=common -fp-model precise +CC = icpc -std=c++14 -fp-trap=common -fp-model precise include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linux64IccKNL/c++ b/wmake/rules/linux64IccKNL/c++ index a84129bd73..9ecdb611a4 100644 --- a/wmake/rules/linux64IccKNL/c++ +++ b/wmake/rules/linux64IccKNL/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 -std=c++11 -xmic-avx512 -DvectorMachine -fp-trap=common -fp-model precise -fp-speculation=safe +CC = icpc -std=c++14 -xmic-avx512 -DvectorMachine -fp-trap=common -fp-model precise -fp-speculation=safe include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linuxARM7Gcc/c++ b/wmake/rules/linuxARM7Gcc/c++ index d9554221c5..fb26a67ffa 100644 --- a/wmake/rules/linuxARM7Gcc/c++ +++ b/wmake/rules/linuxARM7Gcc/c++ @@ -6,7 +6,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++ -std=c++11 +CC = g++ -std=c++14 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linuxArm64Gcc/c++ b/wmake/rules/linuxArm64Gcc/c++ index d9554221c5..fb26a67ffa 100644 --- a/wmake/rules/linuxArm64Gcc/c++ +++ b/wmake/rules/linuxArm64Gcc/c++ @@ -6,7 +6,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++ -std=c++11 +CC = g++ -std=c++14 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linuxClang/c++ b/wmake/rules/linuxClang/c++ index 746cdb13bb..8676fef5bb 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-typedefs -Wno-tautological-undefined-compare -Wno-shift-negative-value -CC = clang++ -std=c++11 -m32 +CC = clang++ -std=c++14 -m32 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linuxGcc/c++ b/wmake/rules/linuxGcc/c++ index 90950e7a01..b2d62e12f7 100644 --- a/wmake/rules/linuxGcc/c++ +++ b/wmake/rules/linuxGcc/c++ @@ -6,7 +6,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++ -std=c++11 -m32 +CC = g++ -std=c++14 -m32 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linuxIcc/c++ b/wmake/rules/linuxIcc/c++ index 8e59e33cc2..5d1a20347f 100644 --- a/wmake/rules/linuxIcc/c++ +++ b/wmake/rules/linuxIcc/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 -std=c++11 -fp-trap=common -fp-model precise +CC = icpc -std=c++14 -fp-trap=common -fp-model precise include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linuxPPC64Gcc/c++ b/wmake/rules/linuxPPC64Gcc/c++ index ba8150a8a2..974553a1d9 100644 --- a/wmake/rules/linuxPPC64Gcc/c++ +++ b/wmake/rules/linuxPPC64Gcc/c++ @@ -6,7 +6,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++ -std=c++11 -m64 -mcpu=power5+ +CC = g++ -std=c++14 -m64 -mcpu=power5+ include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/linuxPPC64leGcc/c++ b/wmake/rules/linuxPPC64leGcc/c++ index 9611ea2e74..9a8420e509 100644 --- a/wmake/rules/linuxPPC64leGcc/c++ +++ b/wmake/rules/linuxPPC64leGcc/c++ @@ -6,7 +6,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++ -std=c++11 -m64 -mcpu=power8 +CC = g++ -std=c++14 -m64 -mcpu=power8 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/solaris64Gcc/c++ b/wmake/rules/solaris64Gcc/c++ index 0844f2afab..005e1d4c98 100644 --- a/wmake/rules/solaris64Gcc/c++ +++ b/wmake/rules/solaris64Gcc/c++ @@ -6,7 +6,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++ -std=c++11 -m64 +CC = g++ -std=c++14 -m64 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) diff --git a/wmake/rules/solarisGcc/c++ b/wmake/rules/solarisGcc/c++ index 7bc009b73c..611d5b6daa 100644 --- a/wmake/rules/solarisGcc/c++ +++ b/wmake/rules/solarisGcc/c++ @@ -6,7 +6,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++ -std=c++11 +CC = g++ -std=c++14 include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)