c++ - Boost Build: Use a feature or a variable -


i have db integration test i'm running using boost build. test needs commandline args (db username, password). what's best way set via boost build in way that's configurable user (via environment variables, bjam commandline, user-config.jam)?

i know can variables:

import os ; local db_pass = [ os.environ db_pass ] ; run dbtest : test.cpp : --dbpass $(db_pass) ; 

this can set via commandline (bjam -s db_pass=pass) or via environment variable.

on other hand, boost build tends of configuration via feature mechanism. define new feature , configuration data right place way.

what's pros , cons of each approach? 1 should take? if features: how that?

nb: actual test within jamfile that's used jamroot, not directly in root file.

i use suggestion of variables. provide great deal of flexibility. don't see how "feature" in case things.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -