From 8f3b0f246388db093c2719990e6503c9718e88ef Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 3 Dec 2015 11:21:23 +0200 Subject: Make use of cli module optional --- bpkg/buildfile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'bpkg/buildfile') diff --git a/bpkg/buildfile b/bpkg/buildfile index d35cc22..ca32b64 100644 --- a/bpkg/buildfile +++ b/bpkg/buildfile @@ -50,12 +50,13 @@ $libs # source files instead of using the cli.cxx{} group (it won't be there # unless the module is loaded). # -# @@ TODO: make it optional. -# @@ The cli{} target won't be available while it would be nice to -# detect that .cli file is newer than the generated files. Hack: -# use ctt= cli.used ? cli : file, then $ctt{common-options}. Uh. -# -using cli +using? cli + +if! $cli.loaded +{ + define cli: file + cli{*}: extension = cli +} {hxx ixx cxx}{common-options}: cli{common-options} {hxx ixx cxx}{configuration-options}: cli{configuration-options} -- cgit v1.1