From f1db1a7e1faee2a5c67d03b6bd283da82eed3730 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 7 Mar 2024 01:41:15 +0000 Subject: [PATCH] cmakelists: add O3 for release --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ab5069b..f43fe35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,6 +16,14 @@ set(LIBDIR ${CMAKE_INSTALL_FULL_LIBDIR}) configure_file(hyprlang.pc.in hyprlang.pc @ONLY) +if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) + message(STATUS "Configuring hyprlang in Debug") + add_compile_definitions(HYPRLAND_DEBUG) +else() + add_compile_options(-O3) + message(STATUS "Configuring hyprlang in Release") +endif() + set(CMAKE_CXX_STANDARD 23) file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp" "include/hyprlang.hpp")