forked from pool/OpenBoard
* poppler >= 24.05 requires c++20
* add 0961-use-cpp20.patch
* add 0962-fix-cpp20-compatibility.patch
* both patches are already merged upstream
and will be part of the next release
OBS-URL: https://build.opensuse.org/package/show/Education/OpenBoard?expand=0&rev=37
40 lines
1.3 KiB
Diff
40 lines
1.3 KiB
Diff
From ffeea1b662b012bd25a025f2130fa2c2044919f9 Mon Sep 17 00:00:00 2001
|
|
From: Vekhir <Vekhir@yahoo.com>
|
|
Date: Mon, 13 May 2024 10:58:33 +0200
|
|
Subject: [PATCH] fix: Make CMAKE_CXX_STANDARD a cache variable
|
|
|
|
poppler 24.05 exposes std::string::starts_with in its headers
|
|
which requires C++20. Requiring C++20 means dropping support
|
|
for still maintained distributions. As such, the C++ standard
|
|
defaults to the current C++17, but can be overridden where
|
|
necessary.
|
|
|
|
Emit a status message showing the chosen C++ standard for debug
|
|
purposes.
|
|
---
|
|
CMakeLists.txt | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 97ad4f50f..33a5599b2 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -80,7 +80,7 @@ set(OPENBOARD_MIMEICON_FILE resources/linux/ch.openboard.application-ubz.svg)
|
|
# Basic compiler settings
|
|
# ==========================================================================
|
|
|
|
-set(CMAKE_CXX_STANDARD 17)
|
|
+set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to use - defaults to C++17")
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
set(CMAKE_AUTOMOC ON)
|
|
set(CMAKE_AUTOUIC ON)
|
|
@@ -89,6 +89,8 @@ list(APPEND CMAKE_AUTOUIC_SEARCH_PATHS
|
|
${OPENBOARD_FORMS_DIR}
|
|
)
|
|
|
|
+message(STATUS "Using C++" ${CMAKE_CXX_STANDARD})
|
|
+
|
|
# OpenMP support
|
|
include(FindOpenMP)
|
|
|