From 17c567248c053bba973e95606cf1915f8190b3f0 Mon Sep 17 00:00:00 2001 From: Norbert Lange Date: Tue, 28 Apr 2026 00:45:55 +0200 Subject: [PATCH 1/2] cmake: add option to enable std::string_view there was no way to build without STL (more like without iostream), but keeping std::string_view. --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e88d3e5da..71eb55b1c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,8 @@ option(PUGIXML_COMPACT "Enable compact mode" OFF) option(PUGIXML_NO_XPATH "Disable XPath" OFF) option(PUGIXML_NO_STL "Disable STL" OFF) option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF) -mark_as_advanced(PUGIXML_NO_XPATH PUGIXML_NO_STL PUGIXML_NO_EXCEPTIONS) +option(PUGIXML_HAS_STRING_VIEW "Enable support for std::string_view" OFF) +mark_as_advanced(PUGIXML_NO_XPATH PUGIXML_NO_STL PUGIXML_NO_EXCEPTIONS PUGIXML_HAS_STRING_VIEW) if (APPLE) option(PUGIXML_BUILD_APPLE_FRAMEWORK "Build as Apple Frameworks" OFF) From 972d095c635591412b36c2aa50ee213bcb8a69ab Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Fri, 12 Jun 2026 12:41:48 -0700 Subject: [PATCH 2/2] Update PUGIXML_HAS_STRING_VIEW description Make the wording tighter as this is a very rarely needed option. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71eb55b1c..01a30525f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,7 @@ option(PUGIXML_COMPACT "Enable compact mode" OFF) option(PUGIXML_NO_XPATH "Disable XPath" OFF) option(PUGIXML_NO_STL "Disable STL" OFF) option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF) -option(PUGIXML_HAS_STRING_VIEW "Enable support for std::string_view" OFF) +option(PUGIXML_HAS_STRING_VIEW "Enable std::string_view even without C++17 or with STL disabled" OFF) mark_as_advanced(PUGIXML_NO_XPATH PUGIXML_NO_STL PUGIXML_NO_EXCEPTIONS PUGIXML_HAS_STRING_VIEW) if (APPLE)