From a2f48ea418cd82ab74242563995cf5d5bbcb6b6e Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Tue, 14 Oct 2025 21:44:38 +0300 Subject: [PATCH] CMake: allow building hyprtester without running tests --- CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 62405bf2c..06ce038a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -519,13 +519,18 @@ install( PATTERN "*.hpp" PATTERN "*.inc") -if(TESTS) - message(STATUS "building tests is enabled TESTS") +if(BUILD_TESTING OR BUILD_HYPRTESTER) + message(STATUS "Building hyprtester") + + add_subdirectory(hyprtester) +endif() + +if(BUILD_TESTING) + message(STATUS "Testing is enabled") enable_testing() add_custom_target(tests) - add_subdirectory(hyprtester) add_test( NAME "Main Test" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/hyprtester @@ -533,5 +538,5 @@ if(TESTS) add_dependencies(tests hyprtester) else() - message(STATUS "building tests is disabled") + message(STATUS "Testing is disabled") endif()