From 3431640427e8fa6f81a0b267a6c6cdd9bec38516 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Fri, 14 Mar 2025 10:38:19 +0800 Subject: Use an explicit dependency for generated headers instead of source file dependency (#6594) * Simplify text writing for core module headers * Use an explicit dependency for generated headers instead of source file dependency From the CMake Docs > Do not list the output in more than one independent target that may build in parallel or the instances of the rule may conflict. Instead, use the add_custom_target() command to drive the command and make the other targets depend on that one. See the Example: Generating Files for Multiple Targets below. --------- Co-authored-by: Yong He --- source/slang/slang-options.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-options.cpp') diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index 72756d360..977cf322c 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -2260,7 +2260,7 @@ SlangResult OptionsParser::_parse(int argc, char const* const* argv) 16, &writer)); - File::writeAllText(fileName.value, builder); + File::writeNativeText(fileName.value, builder.getBuffer(), builder.getLength()); break; } case OptionKind::DumpIrIds: -- cgit v1.2.3