From 7ef83fab5d9515db2aa302f00844acd2703b5765 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 28 Dec 2025 21:48:09 +0100 Subject: WIP --- test/suite/ctor_files/ctor.cc.generated | 48 +++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 test/suite/ctor_files/ctor.cc.generated (limited to 'test/suite/ctor_files') diff --git a/test/suite/ctor_files/ctor.cc.generated b/test/suite/ctor_files/ctor.cc.generated new file mode 100644 index 0000000..5f82fd4 --- /dev/null +++ b/test/suite/ctor_files/ctor.cc.generated @@ -0,0 +1,48 @@ +// -*- c++ -*- +// Distributed under the BSD 2-Clause License. +// See accompanying file LICENSE for details. +#include +#include +#include + +namespace +{ +ctor::build_configurations ctorConfigs(const ctor::settings& settings) +{ + return + { + { + .target = "world", + .sources = { + { "world.cc", ctor::source_type::generated }, + }, + }, + { + .target = "foo", + .sources = { + { "foo.cc", ctor::source_type::generated }, + }, + }, + { + .target = "this_is_unused", + .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) + { + namespace fs = std::filesystem; + std::cout << "Input: " << input << '\n'; + std::cout << "Output: " << output << '\n'; + fs::copy_file(input, output, fs::copy_options::overwrite_existing); + return 0; + } + }, + }; +} +} + +REG(ctorConfigs); -- cgit v1.2.3