3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2026-02-05 00:05:48 +00:00

CMake: allow building hyprtester without running tests

This commit is contained in:
Mihai Fufezan
2025-10-14 21:44:38 +03:00
parent 309c3c7848
commit a2f48ea418

View File

@ -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()