DSSS: More than one build per project

Gregor Richards Richards at codu.org
Sat May 26 12:38:29 PDT 2007


Urban Hafner wrote:
> Hej all,
> 
> I hope this is the right place to ask. That's at least what the DSSS 
> wiki suggests.
> 
> So I have a project that uses dsss to build. The config file is really 
> simple. It just these lines:
> 
> [housebot.d]
> target=housebot-0.6
> buildflags=-Dddoc -unittest -w -g
> 
> Now I want to write another target that gives me the code coverage. I 
> figured out how to manually generate them (using gdc & gcov). But I'm 
> not sure how to get this into my dsss.conf file. I mean I need to 
> compile a files with "-cov" and probably give the executable a different 
> name. Then run the executable, run gcov and clean up the intermediate 
> files.
> 
> How can I do this using dsss? Is it possible? I mean I can't just create 
> another section called [housebot.d].
> 
> Thanks for your help.
> 
> Urban

This isn't really how DSSS is designed to work. dsss.conf effectively 
describes the flags/etc of your project at release time. To build a 
version with unit testing, debug info, coverage, etc, you should just 
pass those flags to dsss build, e.g.:

dsss build -full -unittest -g -cov

If you really want to force DSSS to do this, I'd create a dummy section, 
either as an extra section:

[+housebot_cov]
prebuild=rebuild housebot.d -ofhousebot_cov -unittest -g -cov

Or as a dummy file named something like housebot_cov.d which contains 
only a module declaration and import of housebot.d:

[housebot_cov.d]
buildflags=-whatever -cov

  - Gregor Richards



More information about the Digitalmars-d mailing list