diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-08-04 08:10:34 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-04 08:10:34 -0700 |
| commit | c4c628f6617ae15b1f2445cf893196748d0488fb (patch) | |
| tree | fe12c7d9e2eb8b555bb41a2c0ba01024d2d2eed3 | |
| parent | Merge branch 'js/mingw-fixes' (diff) | |
| parent | meson: ensure correct "clar-decls.h" header is used (diff) | |
| download | git-c4c628f6617ae15b1f2445cf893196748d0488fb.tar.gz git-c4c628f6617ae15b1f2445cf893196748d0488fb.zip | |
Merge branch 'ps/meson-clar-decls-fix'
Build fix.
* ps/meson-clar-decls-fix:
meson: ensure correct "clar-decls.h" header is used
| -rw-r--r-- | t/meson.build | 3 | ||||
| -rw-r--r-- | t/unit-tests/unit-test.h | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/t/meson.build b/t/meson.build index 09f3068f98..bbeba1a8d5 100644 --- a/t/meson.build +++ b/t/meson.build @@ -59,6 +59,9 @@ clar_sources += custom_target( clar_unit_tests = executable('unit-tests', sources: clar_sources + clar_test_suites, + c_args: [ + '-DGIT_CLAR_DECLS_H="' + clar_decls_h.full_path() + '"', + ], dependencies: [libgit_commonmain], ) test('unit-tests', clar_unit_tests, kwargs: test_kwargs) diff --git a/t/unit-tests/unit-test.h b/t/unit-tests/unit-test.h index 85e5d6a948..39a0b72a05 100644 --- a/t/unit-tests/unit-test.h +++ b/t/unit-tests/unit-test.h @@ -1,8 +1,13 @@ #include "git-compat-util.h" #include "clar/clar.h" -#include "clar-decls.h" #include "strbuf.h" +#ifndef GIT_CLAR_DECLS_H +# include "clar-decls.h" +#else +# include GIT_CLAR_DECLS_H +#endif + #define cl_failf(fmt, ...) do { \ char desc[4096]; \ snprintf(desc, sizeof(desc), fmt, __VA_ARGS__); \ |
