From 6accb227b75fef7e99257b0078eb95f9aa0823cc Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 2 Feb 2026 18:30:58 +0100 Subject: New syntax --- test/ctor.cc | 474 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 237 insertions(+), 237 deletions(-) (limited to 'test/ctor.cc') diff --git a/test/ctor.cc b/test/ctor.cc index e7ed038..250acec 100644 --- a/test/ctor.cc +++ b/test/ctor.cc @@ -8,244 +8,244 @@ namespace ctor::build_configurations ctorTestConfigs(const ctor::settings& settings) { return - { { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "argparser_test", - .sources = { - "argparser_test.cc", - "testmain.cc", - }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"argparser\"", - "-fexceptions", - }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "generated_sources_test", - .sources = { - "generated_sources_test.cc", - "testmain.cc", - }, - .depends = { "libctor_nomain.a" }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"generated_sources\"", - "-fexceptions", - }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "argsplit_test", - .sources = { - "argsplit_test.cc", - "testmain.cc", - "../src/util.cc", - }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"argsplit\"", - "-fexceptions", - }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "pointerlist_test", - .sources = { - "pointerlist_test.cc", - "testmain.cc", - "../src/pointerlist.cc", - }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"pointerlist\"", - "-fexceptions", - }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "deps_test", - .sources = { - "deps_test.cc", - "testmain.cc", - "../src/deps.cc", - "../src/util.cc", - }, - .depends = { "testprog", }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"deps\"", - "-fexceptions", - }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "testprog", - .sources = { - "testprog.cc", - }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-fexceptions", - }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "execute_test", - .sources = { - "execute_test.cc", - "testmain.cc", - "../src/execute.cc", - "../src/pointerlist.cc", - "../src/util.cc", - }, - .depends = { "testprog", }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"execute\"", - "-fexceptions", - }, - .ldflags = { "-pthread" }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "tasks_test", - .sources = { - "tasks_test.cc", - "testmain.cc", - }, - .depends = { "libctor_nomain.a" }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"tasks\"", - "-fexceptions", - }, - .ldflags = { "-pthread" }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "cycle_test", - .sources = { - "cycle_test.cc", - "testmain.cc", - }, - .depends = { "libctor_nomain.a" }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"cycle\"", - "-fexceptions", - }, - .ldflags = { "-pthread" }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "source_type_test", - .sources = { - "source_type_test.cc", - "testmain.cc", - }, - .depends = { "libctor_nomain.a" }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"source_type\"", - "-fexceptions", - }, - .ldflags = { "-pthread" }, - }, - }, - { - .type = ctor::target_type::unit_test, - .system = ctor::output_system::build, - .target = "tools_test", - .sources = { - "tools_test.cc", - "testmain.cc", - "../src/util.cc", - "../src/tools.cc", - }, - //.depends = { "libctor_nomain.a" }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", "-Iuunit", - "-DOUTPUT=\"tools\"", - "-fexceptions", - }, - }, - }, - { - .type = ctor::target_type::unit_test_library, - .system = ctor::output_system::build, - .target = "libctor_nomain.a", - .sources = { - "../src/build.cc", - "../src/configure.cc", - "../src/deps.cc", - "../src/execute.cc", - "../src/pointerlist.cc", - "../src/rebuild.cc", - "../src/tasks.cc", - "../src/task.cc", - "../src/task_ar.cc", - "../src/task_cc.cc", - "../src/task_fn.cc", - "../src/task_ld.cc", - "../src/task_so.cc", - "../src/tools.cc", - "../src/util.cc", - "../src/externals_manual.cc", - "../configuration.cc", - }, - .flags = { - .cxxflags = { - "-std=c++20", "-O3", "-Wall", - "-I../src", - "-fexceptions", - }, - .ldflags = { "-pthread" }, - }, - }, - }; + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("argparser_test"), + ctor::sources{ + "argparser_test.cc", + "testmain.cc", + }, + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"argparser\"", + "-fexceptions", + }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("generated_sources_test"), + ctor::sources{ + "generated_sources_test.cc", + "testmain.cc", + }, + ctor::depends({"libctor_nomain.a"}), + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"generated_sources\"", + "-fexceptions", + }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("argsplit_test"), + ctor::sources{ + "argsplit_test.cc", + "testmain.cc", + "../src/util.cc", + }, + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"argsplit\"", + "-fexceptions", + }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("pointerlist_test"), + ctor::sources{ + "pointerlist_test.cc", + "testmain.cc", + "../src/pointerlist.cc", + }, + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"pointerlist\"", + "-fexceptions", + }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("deps_test"), + ctor::sources{ + "deps_test.cc", + "testmain.cc", + "../src/deps.cc", + "../src/util.cc", + }, + ctor::depends({"testprog"}), + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"deps\"", + "-fexceptions", + }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("testprog"), + ctor::sources{ + "testprog.cc", + }, + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-fexceptions", + }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("execute_test"), + ctor::sources{ + "execute_test.cc", + "testmain.cc", + "../src/execute.cc", + "../src/pointerlist.cc", + "../src/util.cc", + }, + ctor::depends({"testprog"}), + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"execute\"", + "-fexceptions", + }, + .ldflags = { "-pthread" }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("tasks_test"), + ctor::sources{ + "tasks_test.cc", + "testmain.cc", + }, + ctor::depends({"libctor_nomain.a"}), + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"tasks\"", + "-fexceptions", + }, + .ldflags = { "-pthread" }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("cycle_test"), + ctor::sources{ + "cycle_test.cc", + "testmain.cc", + }, + ctor::depends({"libctor_nomain.a"}), + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"cycle\"", + "-fexceptions", + }, + .ldflags = { "-pthread" }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("source_type_test"), + ctor::sources{ + "source_type_test.cc", + "testmain.cc", + }, + ctor::depends({"libctor_nomain.a"}), + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"source_type\"", + "-fexceptions", + }, + .ldflags = { "-pthread" }, + }), + }, + { + ctor::target_type::unit_test, + ctor::output_system::build, + ctor::target("tools_test"), + ctor::sources{ + "tools_test.cc", + "testmain.cc", + "../src/util.cc", + "../src/tools.cc", + }, + ctor::depends({"libctor_nomain.a"}), + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", "-Iuunit", + "-DOUTPUT=\"tools\"", + "-fexceptions", + }, + }), + }, + { + ctor::target_type::unit_test_library, + ctor::output_system::build, + ctor::target("libctor_nomain.a"), + ctor::sources{ + "../src/build.cc", + "../src/configure.cc", + "../src/deps.cc", + "../src/execute.cc", + "../src/pointerlist.cc", + "../src/rebuild.cc", + "../src/tasks.cc", + "../src/task.cc", + "../src/task_ar.cc", + "../src/task_cc.cc", + "../src/task_fn.cc", + "../src/task_ld.cc", + "../src/task_so.cc", + "../src/tools.cc", + "../src/util.cc", + "../src/externals_manual.cc", + "../configuration.cc", + }, + ctor::flags({ + .cxxflags = { + "-std=c++20", "-O3", "-Wall", + "-I../src", + "-fexceptions", + }, + .ldflags = { "-pthread" }, + }), + }, + }; } } -- cgit v1.2.3