Add build log to templater

This commit is contained in:
Jan
2022-09-06 00:36:28 +02:00
parent 6a45031c96
commit 379aabebd6
6 changed files with 58 additions and 12 deletions

View File

@ -22,6 +22,12 @@ const CommandLineOption* const OPTION_OUTPUT_FOLDER = CommandLineOption::Builder
.WithParameter("outputPath")
.Build();
const CommandLineOption* const OPTION_BUILD_LOG = CommandLineOption::Builder::Create()
.WithLongName("build-log")
.WithDescription("Specify a file to write a build log to.")
.WithParameter("logFilePath")
.Build();
const CommandLineOption* const OPTION_DEFINE = CommandLineOption::Builder::Create()
.WithShortName("d")
.WithLongName("define")
@ -35,6 +41,7 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]
OPTION_HELP,
OPTION_VERBOSE,
OPTION_OUTPUT_FOLDER,
OPTION_BUILD_LOG,
OPTION_DEFINE
};
@ -87,6 +94,10 @@ bool RawTemplaterArguments::Parse(const int argc, const char** argv)
else
m_output_directory = ".";
// --build-log
if (m_argument_parser.IsOptionSpecified(OPTION_BUILD_LOG))
m_build_log_file = m_argument_parser.GetValueForOption(OPTION_BUILD_LOG);
// -d; --define
if (m_argument_parser.IsOptionSpecified(OPTION_DEFINE))
{