Another question: How can the subPackage code use modules defined in the root package? or defined in another subPackage?

On Wed, 09 Sep 2015 07:10:31 GMT, Sönke Ludwig wrote:

On Tue, 08 Sep 2015 06:43:37 GMT, zhaopuming wrote:

How do I specify in dub.json that I want multiple targets?

I always get "only one main allowed" error.

The idea is to have a "targetType": "none" root package:

{
  "name": "myproject",
  "targetType": "none",
  "subPackages": [
    {
      "name": "target1",
      "targetType": "executable",
      ...
    },
    {
      "name": "target2",
      "targetType": "executable",
      ...
    }
  ]
}

The individual targets can then be built with dub build :target1 and so on. Planned is that just invoking dub build would build all targets and that dub generate visuald would for example build a solution file that contains all targets, but this is still open: #97