From 1ac275b6d4341ab77b769732648755587692dc22 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Wed, 11 Mar 2026 11:33:09 +0100 Subject: [PATCH] Use target_compile_features instead of set(CMAKE_CXX_STANDARD 14) The latter spills into the maps.pc file, which potentially breaks building dependencies which require a higher standard Also increase cmake_minimum_required to silence a warning --- CMakeLists.txt | 4 +--- src/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 69b4734..713e950 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,7 @@ # CMakeLists.txt has to be located in the project folder and cmake has to be # executed from 'project/build' with 'cmake ../'. -cmake_minimum_required(VERSION 3.3) +cmake_minimum_required(VERSION 3.5) project(maps VERSION 0.1) -set(CMAKE_CXX_STANDARD 14) -set(CMAKE_CXX_STANDARD_REQUIRED ON) find_package(Rock) if(COVERAGE) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b8e7166..396a97e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -85,3 +85,5 @@ rock_library(maps Boost::serialization ) +target_compile_features(maps PUBLIC cxx_std_14) +