From 4c988409650d0179aba10c6ee1dfd57857f3309e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=89=A7=E7=BE=8A=E7=8A=AC=E7=9C=9FQ?= Date: Mon, 24 Feb 2025 02:29:40 +0800 Subject: [PATCH] chore: add CXX_STANDARD_REQUIRED flag to ensure c++ version must be c++26 As the [cmake documentation](https://cmake.org/cmake/help/latest/prop_tgt/CXX_STANDARD_REQUIRED.html) said, when we use the CMAKE_CXX_STANDARD without CXX_STANDARD_REQUIRED, then the standard version we set will be an optional value, and may decay back to older c++ version. So I add this configuration into cmakelist to ensure c++ version is c++26. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22bc7498d32..80df37dd5b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,7 @@ add_compile_definitions(HYPRLAND_VERSION="${HYPRLAND_VERSION}") include_directories(. "src/" "protocols/") set(CMAKE_CXX_STANDARD 26) +set(CXX_STANDARD_REQUIRED ON) add_compile_options( -Wall -Wextra