{"thread":{"id":"62137","subject":"[PATCH] cmake: rename clar-related variables to avoid confusion","startedAt":"2024-09-18T19:21:19Z","lastAt":"2024-09-24T10:05:12Z","messageCount":3,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"503013","messageId":"pull.1795.git.1726687276169.gitgitgadget@gmail.com","threadId":"62137","inReplyTo":null,"subject":"[PATCH] cmake: rename clar-related variables to avoid confusion","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2024-09-18T19:21:16Z","receivedAt":"2024-09-18T19:21:19Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nIn c3de556a841f (Makefile: rename clar-related variables to avoid\nconfusion, 2024-09-10) some `Makefile` variables were renamed that were\npartially used by the CMake definition. Adapt the latter to the new lay\nof the land.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    cmake: rename clar-related variables to avoid confusion\n    \n    This is an add-on for ps/clar-unit-tests to let it build with CMake and\n    Visual C.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1795%2Fdscho%2Fclar-unit-tests%2Bcmake-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1795/dscho/clar-unit-tests+cmake-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1795\n\n contrib/buildsystems/CMakeLists.txt | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex 608fd3fe709..7890bc40c5f 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -1004,14 +1004,14 @@ foreach(unit_test ${unit_test_PROGRAMS})\n \tendif()\n endforeach()\n \n-parse_makefile_for_scripts(unit_tests_SUITES \"UNIT_TESTS_SUITES\" \"\")\n+parse_makefile_for_scripts(clar_test_SUITES \"CLAR_TEST_SUITES\" \"\")\n \n set(clar_decls \"\")\n set(clar_cbs \"\")\n set(clar_cbs_count 0)\n set(clar_suites \"static struct clar_suite _clar_suites[] = {\\n\")\n-list(LENGTH unit_tests_SUITES clar_suites_count)\n-foreach(suite ${unit_tests_SUITES})\n+list(LENGTH clar_test_SUITES clar_suites_count)\n+foreach(suite ${clar_test_SUITES})\n \tfile(STRINGS \"${CMAKE_SOURCE_DIR}/t/unit-tests/${suite}.c\" decls\n \t\tREGEX \"^void test_${suite}__[a-zA-Z_0-9][a-zA-Z_0-9]*\\\\(void\\\\)$\")\n \n@@ -1042,9 +1042,9 @@ string(APPEND clar_suites\n file(WRITE \"${CMAKE_BINARY_DIR}/t/unit-tests/clar-decls.h\" \"${clar_decls}\")\n file(WRITE \"${CMAKE_BINARY_DIR}/t/unit-tests/clar.suite\" \"${clar_decls}\" \"${clar_cbs}\" \"${clar_suites}\")\n \n-list(TRANSFORM unit_tests_SUITES PREPEND \"${CMAKE_SOURCE_DIR}/t/unit-tests/\")\n-list(TRANSFORM unit_tests_SUITES APPEND \".c\")\n-add_library(unit-tests-lib ${unit_tests_SUITES} \"${CMAKE_SOURCE_DIR}/t/unit-tests/clar/clar.c\")\n+list(TRANSFORM clar_test_SUITES PREPEND \"${CMAKE_SOURCE_DIR}/t/unit-tests/\")\n+list(TRANSFORM clar_test_SUITES APPEND \".c\")\n+add_library(unit-tests-lib ${clar_test_SUITES} \"${CMAKE_SOURCE_DIR}/t/unit-tests/clar/clar.c\")\n target_include_directories(unit-tests-lib PRIVATE \"${CMAKE_SOURCE_DIR}/t/unit-tests\")\n add_executable(unit-tests \"${CMAKE_SOURCE_DIR}/t/unit-tests/unit-test.c\")\n target_link_libraries(unit-tests unit-tests-lib common-main)\n\nbase-commit: c3de556a841f132832f742d1c4d3a2618ee3b355\n-- \ngitgitgadget\n"},{"id":"503044","messageId":"xmqqa5g4a3i7.fsf@gitster.g","threadId":"62137","inReplyTo":"pull.1795.git.1726687276169.gitgitgadget@gmail.com","subject":"Re: [PATCH] cmake: rename clar-related variables to avoid confusion","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-09-19T00:30:56Z","receivedAt":"2024-09-19T00:30:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> In c3de556a841f (Makefile: rename clar-related variables to avoid\n> confusion, 2024-09-10) some `Makefile` variables were renamed that were\n> partially used by the CMake definition. Adapt the latter to the new lay\n> of the land.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>     cmake: rename clar-related variables to avoid confusion\n>     \n>     This is an add-on for ps/clar-unit-tests to let it build with CMake and\n>     Visual C.\n\nThanks.  \n\nThe base topic is expected to graduate to 'master' in a day or two,\nso this is a very timely and welcome update.\n"},{"id":"503341","messageId":"ZvKOyukIHHAzA2IB@pks.im","threadId":"62137","inReplyTo":"pull.1795.git.1726687276169.gitgitgadget@gmail.com","subject":"Re: [PATCH] cmake: rename clar-related variables to avoid confusion","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2024-09-24T10:05:04Z","receivedAt":"2024-09-24T10:05:12Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Sep 18, 2024 at 07:21:16PM +0000, Johannes Schindelin via GitGitGadget wrote:\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n> \n> In c3de556a841f (Makefile: rename clar-related variables to avoid\n> confusion, 2024-09-10) some `Makefile` variables were renamed that were\n> partially used by the CMake definition. Adapt the latter to the new lay\n> of the land.\n\nAh, thanks for the fixup! I really hope that I can (soonish) make the\ncase for CMake being part of our officially supported build systems that\nis also exercised as part of our CI.\n\nPatrick\n"}]}