From 668158a83bc9e5af7bf65fe88d22d1958e33443f Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 6 Feb 2026 18:25:41 +0100 Subject: New syntax --- test/suite/ctor_files/ctor.cc.generated2 | 39 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'test/suite/ctor_files/ctor.cc.generated2') diff --git a/test/suite/ctor_files/ctor.cc.generated2 b/test/suite/ctor_files/ctor.cc.generated2 index c78489f..2e36c0e 100644 --- a/test/suite/ctor_files/ctor.cc.generated2 +++ b/test/suite/ctor_files/ctor.cc.generated2 @@ -13,27 +13,27 @@ ctor::build_configurations ctorConfigs(const ctor::settings& settings) return { { - .target = "world", - .sources = { + ctor::target("world"), + ctor::sources{ { "world.cc", ctor::source_type::generated }, }, }, { - .target = "foo", - .sources = { + ctor::target("foo"), + ctor::sources{ { "foo.cc", ctor::source_type::generated }, }, }, { - .target = "this_is_unused", - .sources = { + ctor::target("this_is_unused"), + ctor::sources{ {"hello.cc", ctor::output_file{"world.cc"}}, {"hello.cc", ctor::output_file{"foo.cc"}}, }, - .function = [](const std::string& input, - const std::string& output, - const ctor::build_configuration& config, - const ctor::settings& settings) + [](const std::string& input, + const std::string& output, + const ctor::build_configuration& config, + const ctor::settings& settings) { namespace fs = std::filesystem; std::cout << "Input: " << input << '\n'; @@ -44,20 +44,21 @@ ctor::build_configurations ctorConfigs(const ctor::settings& settings) }, { - .target = "many_to_one", - .sources = { + ctor::target("many_to_one"), + ctor::sources{ {"many_to_one.cc", ctor::source_type::generated} - } + }, + ctor::cxx_flags{ "-fexceptions", }, }, { - .target = "many_to_one.cc", - .sources = { + ctor::target("many_to_one.cc"), + ctor::sources{ {"hello.cc"}, }, - .function = [](const std::vector& input, - const std::string& output, - const ctor::build_configuration& config, - const ctor::settings& settings) + [](const std::vector& input, + const std::string& output, + const ctor::build_configuration& config, + const ctor::settings& settings) { std::cout << "Output: " << output << '\n'; std::ofstream ofs(output); -- cgit v1.2.3