Specifying executable names in DUB
Dave
noemailplz at aol.com
Tue Jun 18 02:13:46 UTC 2019
Greetings,
This might be totally obvious, but I can't seem to figure out how
to specify an executable's name&path to be different for each
build types in my DUB package. For example, if my project is
named "dlang_test", I might want something like so:
dub build --build=debug
yields either
bin/dlang_test-debug.exe
or possibly
bin/debug/dlang_test.exe
if I did
dub build --build=release
I might get either
bin/dlang_test-release.exe
or
bin/release/dlang_test.exe
When I read the section on build types
(https://dub.pm/package-format-json.html#build-types), it
specifically mentions that a "buildTypes" entry can override the
build settings, but *not* "targetName" and "targetPath", which is
what I think I want here.
Is there any reason why this is disallowed? Or is there a more
canonical way of achieving this with DUB? What I described above
is often found in other build tools, such as CMake and Visual
Studio, which makes me think I'm missing something obvious here.
Thanks!
More information about the Digitalmars-d-learn
mailing list