summaryrefslogtreecommitdiff
path: root/games-strategy/s25rttr/files/s25rttr-0.9.1-cxx-std.patch
blob: cb5ecdf28220224b683c23a70158e8d517730d67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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