From 90c8609cbb5ae7b488d7b14b4dfb3ec9585ed2b7 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Wed, 2 Jul 2025 00:18:34 +0300 Subject: [PATCH] CMake: disable tests by default (#10899) --- CMakeLists.txt | 2 +- nix/hyprtester.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1079e0c87..423069cc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -455,7 +455,7 @@ install( PATTERN "*.hpp" PATTERN "*.inc") -if(NOT NO_TESTS) +if(TESTS) enable_testing() add_custom_target(tests) diff --git a/nix/hyprtester.nix b/nix/hyprtester.nix index 7b729427b..042228c78 100644 --- a/nix/hyprtester.nix +++ b/nix/hyprtester.nix @@ -10,7 +10,7 @@ }: let inherit (lib.lists) flatten foldl'; inherit (lib.sources) cleanSourceWith cleanSource; - inherit (lib.strings) hasSuffix; + inherit (lib.strings) hasSuffix cmakeBool; adapters = flatten [ stdenvAdapters.useMoldLinker @@ -48,6 +48,8 @@ in cmakeBuildType = "Debug"; + cmakeFlags = [(cmakeBool "TESTS" true)]; + meta = { homepage = "https://github.com/hyprwm/Hyprland"; description = "Hyprland testing framework";