diff options
| author | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-12-28 21:48:09 +0100 |
|---|---|---|
| committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2025-12-28 23:57:19 +0100 |
| commit | 7ef83fab5d9515db2aa302f00844acd2703b5765 (patch) | |
| tree | 2c93620dc80aa654ed7d5979fe35af86894aef20 /test/suite/ctor_files/ctor.cc.generated | |
| parent | 3294ff2f9b7aa92b6dccc653c590ce27fa434f8c (diff) | |
WIPsuite_on_cpp
Diffstat (limited to 'test/suite/ctor_files/ctor.cc.generated')
| -rw-r--r-- | test/suite/ctor_files/ctor.cc.generated | 48 |
1 files changed, 48 insertions, 0 deletions
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 <ctor.h> +#include <filesystem> +#include <iostream> + +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); |
