From 366ef5a5450c6e0e680c924c3454943a9ae9814d Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 30 May 2022 16:38:45 -0700 Subject: Changeset: 55 Buildsystem cleanup: add "projectized" targets --- buildtools/codegen/CodegenUtils.inl | 2 +- buildtools/codegen/main.cpp | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'buildtools/codegen') diff --git a/buildtools/codegen/CodegenUtils.inl b/buildtools/codegen/CodegenUtils.inl index f9d913e..6feb654 100644 --- a/buildtools/codegen/CodegenUtils.inl +++ b/buildtools/codegen/CodegenUtils.inl @@ -90,9 +90,9 @@ void ProduceGeneratedHeaderFileHeader(CodegenOutput& output) { void ProduceGeneratedSourceFileHeader(CodegenOutput& output) { output.AddOutputThing(CodegenOutputThing{ + // TODO we need to get the header name .text = &R"""( // This file is generated. Any changes will be overidden when building. -#include "GeneratedCode.hpp" #include #include diff --git a/buildtools/codegen/main.cpp b/buildtools/codegen/main.cpp index 2c259a4..b139515 100644 --- a/buildtools/codegen/main.cpp +++ b/buildtools/codegen/main.cpp @@ -642,6 +642,9 @@ void HandleInputFile(AppState& state, std::string_view filenameStem, std::string Utils::WriteOutputFile(cgHeaderOutput, state.outputDir, filenameStem, ".gh.inl"sv); Utils::WriteOutputFile(cgSourceOutput, state.outputDir, filenameStem, ".gs.inl"sv); + + // TODO see CMakeLists.txt for rationale, clean this up to be a proper citizen + Utils::WriteOutputFile(CodegenOutput{}, state.outputDir, filenameStem, ".gs.cpp"sv); } enum InputOpcode { @@ -750,8 +753,9 @@ where : the directory to write generated contents to. This will N } } - Utils::WriteOutputFile(state.mainHeaderOutput, state.outputDir, "GeneratedCode.hpp"sv); - Utils::WriteOutputFile(state.mainSourceOutput, state.outputDir, "GeneratedCode.cpp"sv); + // TODO do we even need these? + // Utils::WriteOutputFile(state.mainHeaderOutput, state.outputDir, "GeneratedCode.hpp"sv); + // Utils::WriteOutputFile(state.mainSourceOutput, state.outputDir, "GeneratedCode.cpp"sv); return 0; } -- cgit v1.2.3-70-g09d2