Have DUB sub packages inherit settings

Dennis dkorpel at gmail.com
Wed Oct 9 11:22:43 UTC 2019


I want to split my package into sub packages for faster 
compilation, but I have some custom settings that I don't want to 
copy-paste 10 times since that makes editing them really 
annoying. Is there a way to inherit the settings from the 
main-package, or avoid repetition in another way?

I found this 2 years old post:
https://forum.dlang.org/post/wdkrsfjfbtnmpxcguwca@forum.dlang.org
It is mentioned that when using --combined the flags are 
inherited, but I also want to inherit the settings when not using 
that flag.

The settings in question are:
```
dflags "-dip1000" "-dip25"

buildType "debug" {
	buildOptions "debugMode" "debugInfo"
	buildOptions "betterC"
	buildRequirements "allowWarnings"
}

buildType "release" {
	buildOptions "releaseMode" "optimize" "inline"
	buildOptions "betterC"
}

buildType "unittest" {
	buildOptions "unittests" "debugMode" "debugInfo"
	dflags "-checkaction=context"
	buildRequirements "allowWarnings"
}
```



More information about the Digitalmars-d-learn mailing list