summaryrefslogtreecommitdiff
path: root/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch
diff options
context:
space:
mode:
Diffstat (limited to 'games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch')
-rw-r--r--games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch b/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch
new file mode 100644
index 000000000000..cb5ecdf28220
--- /dev/null
+++ b/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch
@@ -0,0 +1,30 @@
+From 5db419d044149ab3760c1588b44536febab5d657 Mon Sep 17 00:00:00 2001
+From: James Le Cuirot <chewi@gentoo.org>
+Date: Sat, 11 Sep 2021 08:41:57 +0100
+Subject: [PATCH] Set C++ standard (to C++14) using CMake
+
+Not adding the -std flag broke builds with GCC 11 until the code was
+fixed up recently. This should prevent this sort of thing from
+happening in future. It also ensures that the compiler is actually new
+enough.
+---
+ CMakeLists.txt | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8ab991c97..b55c545a2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -22,6 +22,9 @@ if(DEFINED CMAKE_TOOLCHAIN_FILE)
+ message(STATUS "Used Toolchain definition file '${CMAKE_TOOLCHAIN_FILE}'")
+ endif()
+
++set(CMAKE_CXX_STANDARD 14)
++set(CXX_STANDARD_REQUIRED ON)
++
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" "${CMAKE_SOURCE_DIR}/external/libutil/cmake")
+ if(CMAKE_VERSION VERSION_LESS 3.14)
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external/libutil/cmake/cmake_3.14")
+--
+2.32.0
+