Skip to content

Commit d0f6bd8

Browse files
committed
cmake: rename clar-related variables to avoid confusion
In c3de556 (Makefile: rename clar-related variables to avoid confusion, 2024-09-10) some `Makefile` variables were renamed that were partially used by the CMake definition. Adapt the latter to the new lay of the land. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 8a1a532 commit d0f6bd8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,14 +1029,14 @@ foreach(unit_test ${unit_test_PROGRAMS})
10291029
endif()
10301030
endforeach()
10311031

1032-
parse_makefile_for_scripts(unit_tests_SUITES "UNIT_TESTS_SUITES" "")
1032+
parse_makefile_for_scripts(clar_test_SUITES "CLAR_TEST_SUITES" "")
10331033

10341034
set(clar_decls "")
10351035
set(clar_cbs "")
10361036
set(clar_cbs_count 0)
10371037
set(clar_suites "static struct clar_suite _clar_suites[] = {\n")
1038-
list(LENGTH unit_tests_SUITES clar_suites_count)
1039-
foreach(suite ${unit_tests_SUITES})
1038+
list(LENGTH clar_test_SUITES clar_suites_count)
1039+
foreach(suite ${clar_test_SUITES})
10401040
file(STRINGS "${CMAKE_SOURCE_DIR}/t/unit-tests/${suite}.c" decls
10411041
REGEX "^void test_${suite}__[a-zA-Z_0-9][a-zA-Z_0-9]*\\(void\\)$")
10421042

@@ -1067,9 +1067,9 @@ string(APPEND clar_suites
10671067
file(WRITE "${CMAKE_BINARY_DIR}/t/unit-tests/clar-decls.h" "${clar_decls}")
10681068
file(WRITE "${CMAKE_BINARY_DIR}/t/unit-tests/clar.suite" "${clar_decls}" "${clar_cbs}" "${clar_suites}")
10691069

1070-
list(TRANSFORM unit_tests_SUITES PREPEND "${CMAKE_SOURCE_DIR}/t/unit-tests/")
1071-
list(TRANSFORM unit_tests_SUITES APPEND ".c")
1072-
add_library(unit-tests-lib ${unit_tests_SUITES} "${CMAKE_SOURCE_DIR}/t/unit-tests/clar/clar.c")
1070+
list(TRANSFORM clar_test_SUITES PREPEND "${CMAKE_SOURCE_DIR}/t/unit-tests/")
1071+
list(TRANSFORM clar_test_SUITES APPEND ".c")
1072+
add_library(unit-tests-lib ${clar_test_SUITES} "${CMAKE_SOURCE_DIR}/t/unit-tests/clar/clar.c")
10731073
target_include_directories(unit-tests-lib PRIVATE "${CMAKE_SOURCE_DIR}/t/unit-tests")
10741074
add_executable(unit-tests "${CMAKE_SOURCE_DIR}/t/unit-tests/unit-test.c")
10751075
target_link_libraries(unit-tests unit-tests-lib common-main)

0 commit comments

Comments
 (0)