Thread overview |
---|
April 06, 2016 Build release and debug with dub | ||||
---|---|---|---|---|
| ||||
Is it's possible to make rule, that allow to build two version of App? One release and one debug at same time. I looked at "buildTypes" https://code.dlang.org/package-format?lang=json But it's not possible to set different names for output files. I want to build App.exe and AppDebug.exe after simple command dub build. |
April 07, 2016 Re: Build release and debug with dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Suliman | On Wednesday, 6 April 2016 at 19:49:38 UTC, Suliman wrote:
> Is it's possible to make rule, that allow to build two version of App? One release and one debug at same time. I looked at "buildTypes" https://code.dlang.org/package-format?lang=json
>
> But it's not possible to set different names for output files. I want to build App.exe and AppDebug.exe after simple command dub build.
In the document it says you can not specify targetName in buildType. I wonder why is that?
But you can use two configurations like this(assumming your project is named "App"):
```
configuration "App" {
targetType "executable"
targetName "hello"
}
configuration "AppDebug" {
targetType "executable"
targetName "AppDebug"
}
```
and use `dub -c AppDebug` for AppDebug.exe, and `dub -b release` for App.exe
|
April 07, 2016 Re: Build release and debug with dub | ||||
---|---|---|---|---|
| ||||
Posted in reply to Puming | On Thursday, 7 April 2016 at 02:07:18 UTC, Puming wrote: > On Wednesday, 6 April 2016 at 19:49:38 UTC, Suliman wrote: >> [...] > > In the document it says you can not specify targetName in buildType. I wonder why is that? > > But you can use two configurations like this(assumming your project is named "App"): > > ``` > configuration "App" { > targetType "executable" > targetName "hello" typo: "hello" -> "App" > } > configuration "AppDebug" { > targetType "executable" > targetName "AppDebug" > } > ``` > > and use `dub -c AppDebug` for AppDebug.exe, and `dub -b release` for App.exe |
Copyright © 1999-2021 by the D Language Foundation