From 0697033ec271aa76ecb9aff89487b7a07f6b4a8c Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 25 Dec 2025 18:24:30 +0100 Subject: Decorate sources as 'generated' to make sure they inject a dependency to their generators, and look for the sources in the build folder instead of the source folder. --- src/ctor.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/ctor.h') diff --git a/src/ctor.h b/src/ctor.h index 8dd2ddd..f145eef 100644 --- a/src/ctor.h +++ b/src/ctor.h @@ -67,6 +67,12 @@ struct output_file std::string file; }; +enum class source_type +{ + regular, + generated, +}; + struct source { template @@ -74,6 +80,7 @@ struct source std::is_convertible_v || std::is_same_v || std::is_same_v || + std::is_same_v || std::is_same_v ) && ...) constexpr source(Args && ... arg) @@ -96,6 +103,10 @@ struct source { output = arg.file; } + else if constexpr(std::is_same_v) + { + source_type = arg; + } }(), ...); } @@ -103,6 +114,7 @@ struct source ctor::toolchain toolchain{ctor::toolchain::any}; ctor::language language{ctor::language::automatic}; std::string output{}; + ctor::source_type source_type{ctor::source_type::regular}; }; enum class cxx_opt -- cgit v1.2.3