From d779eb434f9d2482e9217af830f3334df94473d0 Mon Sep 17 00:00:00 2001 From: Daniel Poelzleithner Date: Fri, 11 Nov 2022 19:32:09 +0100 Subject: [PATCH] Allow lsyncd to be build in the source folder without breaking. Not recommended --- CMakeLists.txt | 8 +++++--- tests/ci-run.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38a8024..68d01bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,13 +103,15 @@ add_custom_target( docs-html DEPENDS ${CMAKE_SOURCE_DIR}/docs ) +add_custom_command( + OUTPUT tests + COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/tests tests) -# create_symlink( ${CMAKE_SOURCE_DIR}/tests tests) ADD_CUSTOM_TARGET(prepare_tests ALL - COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SOURCE_DIR}/tests tests + DEPENDS tests/ ) -add_custom_target( tests +add_custom_target( run-tests COMMAND echo "Running the tests" COMMAND echo "Note you are expected to:" COMMAND echo " * have lua-posix installed" diff --git a/tests/ci-run.sh b/tests/ci-run.sh index 6c8d1ab..7665078 100755 --- a/tests/ci-run.sh +++ b/tests/ci-run.sh @@ -17,5 +17,5 @@ echo "Build folder: $BUILD_FOLDER" cd $BUILD_FOLDER cmake $SRC make VERBOSE=1 -make tests +make run-tests rm -rf $BUILD_FOLDER \ No newline at end of file