Skip to content

Commit 6438394

Browse files
committed
enforcing minimum c++ 11 to match the meson build
1 parent 48a51ac commit 6438394

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
cmake_minimum_required(VERSION 3.10)
22
project(pystring LANGUAGES CXX VERSION 1.1.4)
33

4+
set(CMAKE_CXX_STANDARD 11)
5+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
6+
set(CMAKE_CXX_EXTENSIONS OFF)
7+
48
option (BUILD_SHARED_LIBS "Build shared libraries (set to OFF to build static libs)" ON)
59
option(PYSTRING_HEADER_ONLY "Build as header-only library" OFF)
610

@@ -13,6 +17,7 @@ if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT
1317
"Installation location" FORCE)
1418
endif()
1519
message (STATUS "Installation path will be ${CMAKE_INSTALL_PREFIX}")
20+
include(GNUInstallDirs)
1621

1722
if(PYSTRING_HEADER_ONLY)
1823
message(STATUS "Building pystring as header-only library")
@@ -63,4 +68,3 @@ TARGET_LINK_LIBRARIES (pystring_test pystring)
6368
enable_testing()
6469
add_test(NAME PyStringTest COMMAND pystring_test)
6570

66-
include(GNUInstallDirs)

0 commit comments

Comments
 (0)