From 92b1650686a016023ae9e4b1b1beab6c1788c6f7 Mon Sep 17 00:00:00 2001 From: Thomas Fischer Date: Thu, 23 May 2024 19:59:51 +0200 Subject: [PATCH] [PATCH] Switch to C++17 for recent ICU4C versions Starting with ICU version 75, it makes use of C++ 17 constructs, so KBibTeX no longer compiles if C++ is still set to C++ 11. With this change, the C++ standard is raised to C++17 if a recent ICU is detected. Gbp-Pq: Name upstream_Switch-to-C-17-for-recent-ICU4C-versions.patch --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 901e697..4ae3d63 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,10 @@ find_package( ) if(ICU_FOUND) add_definitions(-DHAVE_ICU) + if(ICU_VERSION GREATER_EQUAL 75) + # Starting with ICU 75, it makes use of C++17 instead of C++11 before + set(CMAKE_CXX_STANDARD 17) + endif() endif() option( -- 2.30.2