From fc820c883938e7daa257820c818a5c6b609f755f Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Mon, 27 Mar 2023 06:49:10 +0200 Subject: Path delim macro --- gen_cmake.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'gen_cmake.c') diff --git a/gen_cmake.c b/gen_cmake.c index 0f11407..4ed98de 100644 --- a/gen_cmake.c +++ b/gen_cmake.c @@ -205,19 +205,17 @@ int main(int argc, char **argv) { str_t const targets[] = { SZ("kit"), SZ("kit_test"), SZ("kit_test_suite") }; - string_t folders[] = { path_norm(SZ("./source/kit"), ALLOC), - path_norm(SZ("./source/kit_test"), ALLOC), - path_norm(SZ("./source/test/unittests"), - ALLOC) }; + str_t const folders[] = { + SZ("." PATH_DELIM "source" PATH_DELIM "kit"), + SZ("." PATH_DELIM "source" PATH_DELIM "kit_test"), + SZ("." PATH_DELIM "source" PATH_DELIM "test/unittests") + }; int ok = 1; for (ptrdiff_t i = 0; i < sizeof folders / sizeof *folders; i++) - ok = ok && gen_cmakelists_for(targets[i], WRAP_STR(folders[i])) - .status == KIT_OK; - - for (ptrdiff_t i = 0; i < sizeof folders / sizeof *folders; i++) - DA_DESTROY(folders[i]); + ok = ok && + gen_cmakelists_for(targets[i], folders[i]).status == KIT_OK; return ok ? 0 : 1; } -- cgit v1.2.3