From 706bf2d23a8547435d15b597db504405a878843d Mon Sep 17 00:00:00 2001 From: grdanny Date: Sun, 22 Feb 2026 16:22:50 -0800 Subject: [PATCH] enforcing min c++ 11 to match the new meson build system --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d35d72..a0318b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,10 @@ cmake_minimum_required(VERSION 3.10) project(pystring LANGUAGES CXX VERSION 1.1.4) +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON) option(PYSTRING_HEADER_ONLY "Build as header-only library" OFF) @@ -13,6 +17,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT "Installation location" FORCE) endif() message (STATUS "Installation path will be ${CMAKE_INSTALL_PREFIX}") +include(GNUInstallDirs) if(PYSTRING_HEADER_ONLY) message(STATUS "Building pystring as header-only library") @@ -63,4 +68,3 @@ TARGET_LINK_LIBRARIES (pystring_test pystring) enable_testing() add_test(NAME PyStringTest COMMAND pystring_test) -include(GNUInstallDirs)