Skip to content

Commit eda5a91

Browse files
committed
Merge branch 'reftable-vs-cmake'
This fixup is needed to build Git using CMake in the wake of the recent migration of the reftable tests from being regression tests written in Unix shell script to being unit tests in pure C. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents c504da5 + a59f072 commit eda5a91

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,9 @@ parse_makefile_for_sources(clar-test_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "CLAR_
10051005
list(TRANSFORM clar-test_SOURCES REPLACE "\\$\\(UNIT_TEST_DIR\\)/" "${CMAKE_SOURCE_DIR}/t/unit-tests/")
10061006
add_library(clar-test-lib STATIC ${clar-test_SOURCES})
10071007

1008-
parse_makefile_for_scripts(unit_test_PROGRAMS "UNIT_TEST_PROGRAMS" "")
1008+
file(GLOB unit_test_PROGRAMS "${CMAKE_SOURCE_DIR}/t/unit-tests/t-*.c")
1009+
list(TRANSFORM unit_test_PROGRAMS REPLACE "${CMAKE_SOURCE_DIR}/" "")
1010+
list(TRANSFORM unit_test_PROGRAMS REPLACE ".c" "")
10091011
foreach(unit_test ${unit_test_PROGRAMS})
10101012
add_executable("${unit_test}" "${CMAKE_SOURCE_DIR}/t/unit-tests/${unit_test}.c")
10111013
target_link_libraries("${unit_test}" unit-test-lib clar-test-lib common-main)

0 commit comments

Comments
 (0)