Skip to content

Commit

Permalink
cmake: add CXX_STANDARD_REQUIRED flag to ensure c++ version must be c…
Browse files Browse the repository at this point in the history
…++26 (#9476)

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.
  • Loading branch information
CollieIsCute authored and vaxerski committed Feb 25, 2025
1 parent d1ea18b commit f085090
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f085090

Please sign in to comment.