ocaml/dune

Setting dune build directory from dune-workspace

开放

#3,154 创建于 2020年2月18日

 (8 条评论) (0 个反应) (0 位负责人)OCaml (478 个派生)github user discovery
acceptedgood first issue

仓库指标

星标
 (1,882 个星标)
PR 合并指标
 (平均合并 1天 20小时) (30 天内合并 345 个 PR)

描述

I'd like to set the dune build directory from the dune-workspace file instead of specifying it on the command line. It looked like I might be able to achieve this by using the (env) stanza to set the DUNE_BUILD_DIR environment variable.

I tried (env (_ (env-vars (DUNE_BUILD_DIR /path/to/new/_build)))) but that din't seem to have any effect (the _build directory in the root was still generated). I also confirmed that setting the environment variable normally on the command line does produce the expected result.

Incidentally this seems like a pretty circuitous way to set this setting - it should probably be configurable from the dune-workspace file natively.

贡献者指南