add ctest support and remove absolute path from etc directory
Some packagers use ctest by default to run tests. This is a small easy-win to add to biboumi. In addition some distros don't use /etc as their configuration path, and have to patch this out (see guix and nix), so this is also an easy fix.
This commit is contained in:
committed by
mathieui
parent
0d714c2c0d
commit
ee7ecebbdc
+4
-1
@@ -293,6 +293,9 @@ endforeach()
|
|||||||
find_package(Catch2)
|
find_package(Catch2)
|
||||||
if(Catch2_FOUND)
|
if(Catch2_FOUND)
|
||||||
target_link_libraries(test_suite Catch2::Catch2WithMain)
|
target_link_libraries(test_suite Catch2::Catch2WithMain)
|
||||||
|
include(CTest)
|
||||||
|
include(Catch)
|
||||||
|
catch_discover_tests(test_suite)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -339,7 +342,7 @@ install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
|
|||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/biboumi.1 DESTINATION share/man/man1 OPTIONAL COMPONENT documentation)
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/man/biboumi.1 DESTINATION share/man/man1 OPTIONAL COMPONENT documentation)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/biboumi.service DESTINATION lib/systemd/system COMPONENT init)
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/biboumi.service DESTINATION lib/systemd/system COMPONENT init)
|
||||||
file(GLOB policy_files conf/*policy.txt)
|
file(GLOB policy_files conf/*policy.txt)
|
||||||
install(FILES ${policy_files} DESTINATION /etc/biboumi COMPONENT configuration)
|
install(FILES ${policy_files} DESTINATION etc/biboumi COMPONENT configuration)
|
||||||
|
|
||||||
#
|
#
|
||||||
## Dist target
|
## Dist target
|
||||||
|
|||||||
Reference in New Issue
Block a user