Newbie: out-of-source builds with "dub"?
Seb
seb at wilzba.ch
Mon Jul 30 17:19:49 UTC 2018
On Monday, 30 July 2018 at 10:23:06 UTC, CC wrote:
> With "targetPath", it sounds like I'd need to modify a file
> (DUB's .json file) that's in the source tree to indicate where
> some(?)/all(?) of the files resulting from the build would be
> stored.
Yes.
> But it sounds like I'm maybe fighting DUB's design by even
> attempting out-of-source builds. So I need to ask: when using
> Dlang and DUB, are in-source builds simply the idiomatic way of
> doing things?
Yes one typically uses dub within the source, e.g. `dub` (or `dub
build`).
> As much as I'm a fan of out-of-source builds, I'm trying to be
> open-minded as I dive into D.
There might be another way. Dub can generate Cmake files:
dub generate cmake
Though I think you'll need cmake-d
(https://github.com/dcarp/cmake-d) for it (disclaimer: I never
played with dub's support for cmake.)
More information about the Digitalmars-d-learn
mailing list