Build: Move from using C++11 to C++14. Bug: b/147359661 Change-Id: Ieb2de4d93ca617b190977e258023992f4a6d34c9 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/39948 Reviewed-by: Nicolas Capens <nicolascapens@google.com> Tested-by: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json index 7c0fbac..18d6a18 100644 --- a/.vscode/c_cpp_properties.json +++ b/.vscode/c_cpp_properties.json
@@ -18,7 +18,7 @@ "${workspaceFolder}/third_party/cppdap/include" ], "cStandard": "c11", - "cppStandard": "c++11" + "cppStandard": "c++14" }, { "name": "Mac", @@ -38,7 +38,7 @@ "${workspaceFolder}/third_party/cppdap/include" ], "cStandard": "c11", - "cppStandard": "c++11" + "cppStandard": "c++14" }, { "name": "Win32", @@ -58,7 +58,7 @@ "${workspaceFolder}/third_party/cppdap/include" ], "cStandard": "c11", - "cppStandard": "c++11" + "cppStandard": "c++14" } ], "version": 4
diff --git a/Android.bp b/Android.bp index a48bb4f..9ac0441 100644 --- a/Android.bp +++ b/Android.bp
@@ -32,7 +32,7 @@ "-DVK_USE_PLATFORM_ANDROID_KHR", "-DVK_EXPORT= ", ], - cpp_std: "c++11", + cpp_std: "c++14", target: { host: {
diff --git a/BUILD.gn b/BUILD.gn index 655cfad..a32cf80 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -60,7 +60,7 @@ } } else { cflags = [ - "-std=c++11", + "-std=c++14", "-fno-exceptions", "-fno-operator-names", ]
diff --git a/CMakeLists.txt b/CMakeLists.txt index f27ee1e..2b0f1e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -1,5 +1,7 @@ cmake_minimum_required(VERSION 3.6.3) +set(CMAKE_CXX_STANDARD 14) + project(SwiftShader C CXX ASM) # On Windows we use custom solution and project files, except for certain third- @@ -360,7 +362,6 @@ ) else() - set_cpp_flag("--std=c++11") set_cpp_flag("-fno-exceptions") list(APPEND SWIFTSHADER_COMPILE_OPTIONS