Skip to content

Commit 305d187

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
cmake: fix build of t-oidtree
When the `oidtree` test helper was turned into a unit test, a new `lib-oid` source file was added as dependency. This was only done in the Makefile so far, but also needs to be done in the CMake definition. This is a companion of ed54840 (t/: migrate helper/test-oidtree.c to unit-tests/t-oidtree.c, 2024-06-08). Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 136467e commit 305d187

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/buildsystems/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -1005,11 +1005,12 @@ list(TRANSFORM test-reftable_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/")
10051005

10061006
#unit-tests
10071007
add_library(unit-test-lib OBJECT ${CMAKE_SOURCE_DIR}/t/unit-tests/test-lib.c)
1008+
add_library(unit-test-lib-oid OBJECT ${CMAKE_SOURCE_DIR}/t/unit-tests/lib-oid.c)
10081009

10091010
parse_makefile_for_scripts(unit_test_PROGRAMS "UNIT_TEST_PROGRAMS" "")
10101011
foreach(unit_test ${unit_test_PROGRAMS})
10111012
add_executable("${unit_test}" "${CMAKE_SOURCE_DIR}/t/unit-tests/${unit_test}.c")
1012-
target_link_libraries("${unit_test}" unit-test-lib common-main)
1013+
target_link_libraries("${unit_test}" unit-test-lib unit-test-lib-oid common-main)
10131014
set_target_properties("${unit_test}"
10141015
PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/t/unit-tests/bin)
10151016
if(MSVC)

0 commit comments

Comments
 (0)