summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-04-26 16:28:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2024-04-26 16:28:36 (GMT)
commitd01c32bd0f74220cc03caee54969dd74f91001fb (patch)
tree0d9de598e1f7d3abcc3a1bf1366ed13b4463841a
parente729936f3b32fa6814a47f268ff63250b396f760 (diff)
parentd14cfd0ffab1c381e47d5c6d27820385ffab262a (diff)
downloadgit-d01c32bd0f74220cc03caee54969dd74f91001fb.zip
git-d01c32bd0f74220cc03caee54969dd74f91001fb.tar.gz
git-d01c32bd0f74220cc03caee54969dd74f91001fb.tar.bz2
Merge branch 'js/cmake-with-test-tool' into seen
"test-tool" is now built in CMake build to also run the unit tests. * js/cmake-with-test-tool: cmake: let `test-tool` run the unit tests, too
-rw-r--r--contrib/buildsystems/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index 804629c..2f9c335 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -1005,10 +1005,11 @@ endforeach()
#test-tool
parse_makefile_for_sources(test-tool_SOURCES "TEST_BUILTINS_OBJS")
+add_library(test-lib OBJECT ${CMAKE_SOURCE_DIR}/t/unit-tests/test-lib.c)
list(TRANSFORM test-tool_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/t/helper/")
add_executable(test-tool ${CMAKE_SOURCE_DIR}/t/helper/test-tool.c ${test-tool_SOURCES} ${test-reftable_SOURCES})
-target_link_libraries(test-tool common-main)
+target_link_libraries(test-tool test-lib common-main)
set_target_properties(test-fake-ssh test-tool
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/t/helper)