C++11: Update compilation rules to specify C++11 support and conformance

The change from C++0x to C++11 allows all of C++11 functionality to be
used in OpenFOAM, in particular constructor delegation which avoids code
duplication or constructor helper functions.  However, this also means a
change to the minimum gcc version supported which is now 4.7 rather than
4.5.

Note that gcc-4.7 does not support the entire C++11 standard but does
support all of the functionality currently needed for further OpenFOAM
development.  The minimum gcc-version which supports the entire C++11
standard is 4.8 which is now the recommended minimum gcc version.
This commit is contained in:
Henry Weller
2016-08-05 16:28:19 +01:00
parent 7a299ed7cb
commit 7996a9138f
17 changed files with 15 additions and 27 deletions

View File

@ -225,12 +225,6 @@ case ThirdParty:
case Gcc48: case Gcc48:
set gcc_version=gcc-4.8.5 set gcc_version=gcc-4.8.5
breaksw breaksw
case Gcc45:
set gcc_version=gcc-4.5.4
breaksw
case Gcc46:
set gcc_version=gcc-4.6.4
breaksw
case Gcc47: case Gcc47:
set gcc_version=gcc-4.7.4 set gcc_version=gcc-4.7.4
breaksw breaksw

View File

@ -42,12 +42,6 @@ OpenFOAM | ThirdParty)
Gcc | Gcc48) Gcc | Gcc48)
gcc_version=gcc-4.8.5 gcc_version=gcc-4.8.5
;; ;;
Gcc45)
gcc_version=gcc-4.5.4
;;
Gcc46)
gcc_version=gcc-4.6.4
;;
Gcc47) Gcc47)
gcc_version=gcc-4.7.4 gcc_version=gcc-4.7.4
;; ;;

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # 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 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-tautological-undefined-compare -Wno-shift-negative-value
CC = clang++ -std=c++0x -m64 CC = clang++ -std=c++11 -m64
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = g++ -std=c++0x -m64 CC = g++ -std=c++11 -m64
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = g++ -std=c++0x -m64 -march=knl -DvectorMachine -DKNL CC = g++ -std=c++11 -m64 -march=knl -DvectorMachine -DKNL
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -6,7 +6,7 @@ c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invali
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305 c++LESSWARN = -diag-disable 1224,2026,2305
CC = icpc -std=c++0x -fp-trap=common -fp-model precise CC = icpc -std=c++11 -fp-trap=common -fp-model precise
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -6,7 +6,7 @@ c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invali
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305 c++LESSWARN = -diag-disable 1224,2026,2305
CC = icpc -std=c++0x -fp-trap=common -fp-model precise -fp-speculation=safe -DKNL CC = icpc -std=c++11 -fp-trap=common -fp-model precise -fp-speculation=safe -DKNL
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = g++ -std=c++0x CC = g++ -std=c++11
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # 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 c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedef -Wno-tautological-undefined-compare -Wno-shift-negative-value
CC = clang++ -std=c++0x -m32 CC = clang++ -std=c++11 -m32
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = g++ -std=c++0x -m32 CC = g++ -std=c++11 -m32
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = g++ -std=c++0x CC = g++ -std=c++11
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -6,7 +6,7 @@ c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invali
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305 c++LESSWARN = -diag-disable 1224,2026,2305
CC = icpc -std=c++0x CC = icpc -std=c++11
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -6,7 +6,7 @@ c++WARN = -Wall -Wextra -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invali
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -diag-disable 1224,2026,2305 c++LESSWARN = -diag-disable 1224,2026,2305
CC = icpc -std=c++0x -fp-trap=common -fp-model precise CC = icpc -std=c++11 -fp-trap=common -fp-model precise
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = g++ -std=c++0x -m64 -mcpu=power5+ CC = g++ -std=c++11 -m64 -mcpu=power5+
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds c++LESSWARN = -Wno-old-style-cast -Wno-unused-local-typedefs -Wno-array-bounds
CC = g++ -std=c++0x -m64 -mcpu=power8 CC = g++ -std=c++11 -m64 -mcpu=power8
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = c++LESSWARN =
CC = g++ -std=c++0x -m64 CC = g++ -std=c++11 -m64
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)

View File

@ -5,7 +5,7 @@ c++WARN = -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-para
# Suppress some warnings for flex++ and CGAL # Suppress some warnings for flex++ and CGAL
c++LESSWARN = c++LESSWARN =
CC = g++ -std=c++0x CC = g++ -std=c++11
include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION) include $(DEFAULT_RULES)/c++$(WM_COMPILE_OPTION)