mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-24 05:10:03 +01:00
CMake: allow building hyprtester without running tests
This commit is contained in:
parent
309c3c7848
commit
a2f48ea418
1 changed files with 9 additions and 4 deletions
|
|
@ -519,13 +519,18 @@ install(
|
||||||
PATTERN "*.hpp"
|
PATTERN "*.hpp"
|
||||||
PATTERN "*.inc")
|
PATTERN "*.inc")
|
||||||
|
|
||||||
if(TESTS)
|
if(BUILD_TESTING OR BUILD_HYPRTESTER)
|
||||||
message(STATUS "building tests is enabled TESTS")
|
message(STATUS "Building hyprtester")
|
||||||
|
|
||||||
|
add_subdirectory(hyprtester)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_TESTING)
|
||||||
|
message(STATUS "Testing is enabled")
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
add_custom_target(tests)
|
add_custom_target(tests)
|
||||||
|
|
||||||
add_subdirectory(hyprtester)
|
|
||||||
add_test(
|
add_test(
|
||||||
NAME "Main Test"
|
NAME "Main Test"
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/hyprtester
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/hyprtester
|
||||||
|
|
@ -533,5 +538,5 @@ if(TESTS)
|
||||||
|
|
||||||
add_dependencies(tests hyprtester)
|
add_dependencies(tests hyprtester)
|
||||||
else()
|
else()
|
||||||
message(STATUS "building tests is disabled")
|
message(STATUS "Testing is disabled")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue