diff --git a/source/dub/commandline.d b/source/dub/commandline.d index 343a403..58234de 100644 --- a/source/dub/commandline.d +++ b/source/dub/commandline.d @@ -678,7 +678,7 @@ { foreach (ref arg; m_recognizedArgs) if (names == arg.names) { - assert(help_text is null); + assert(help_text is null, format!("Duplicated argument '%s' must not change helptext, consider to remove the duplication")(names)); *var = arg.value.get!T; return; } @@ -1239,6 +1239,10 @@ override void prepare(scope CommandArgs args) { + args.getopt("temp-build", &this.baseSettings.tempBuild, [ + "Builds the project in the temp folder if possible." + ]); + args.getopt("rdmd", &this.baseSettings.rdmd, [ "Use rdmd instead of directly invoking the compiler" ]); @@ -1344,10 +1348,6 @@ override void prepare(scope CommandArgs args) { - args.getopt("temp-build", &this.baseSettings.tempBuild, [ - "Builds the project in the temp folder if possible." - ]); - super.prepare(args); this.baseSettings.run = true; } @@ -1392,6 +1392,10 @@ override void prepare(scope CommandArgs args) { + args.getopt("temp-build", &this.baseSettings.tempBuild, [ + "Builds the project in the temp folder if possible." + ]); + args.getopt("main-file", &m_mainFile, [ "Specifies a custom file containing the main() function to use for running the tests." ]); diff --git a/source/dub/generators/build.d b/source/dub/generators/build.d index 7a4ddce..dfe26fe 100644 --- a/source/dub/generators/build.d +++ b/source/dub/generators/build.d @@ -579,7 +579,11 @@ settings.compiler.invoke(buildsettings, settings.platform, settings.compileCallback); if (generate_binary) { - logInfo("Linking", Color.light_green, "%s", buildsettings.targetName.color(Mode.bold)); + if (settings.tempBuild) { + logInfo("Linking", Color.light_green, "%s => %s", buildsettings.targetName.color(Mode.bold), buildsettings.getTargetPath(settings)); + } else { + logInfo("Linking", Color.light_green, "%s", buildsettings.targetName.color(Mode.bold)); + } settings.compiler.invokeLinker(lbuildsettings, settings.platform, [tempobj.toNativeString()], settings.linkCallback); } }