-
Notifications
You must be signed in to change notification settings - Fork 0
/
wscript
40 lines (33 loc) · 925 Bytes
/
wscript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#! /usr/bin/env python
# encoding: utf-8
APPNAME = "CLI11"
VERSION = "2.0.1"
def configure(conf):
conf.set_cxx_std(11)
def build(bld):
use_flags = []
if bld.is_mkspec_platform("linux"):
use_flags += ["PTHREAD"]
# Path to the cli11 repo
cli11_path = bld.dependency_node("cli11-source")
defines = []
if (
"clang" not in bld.env.CXX_NAME
and "g++" in bld.env.CXX_NAME
and int(bld.env.CC_VERSION[0]) < 9
):
defines += ["CLI11_HAS_FILESYSTEM=0"]
# Create system include for cli11
bld(
name="cli11",
export_includes=cli11_path.find_dir("include").abspath(),
export_defines=defines,
)
if bld.is_toplevel():
# Build the example
bld.program(
features="cxx",
source=cli11_path.ant_glob("examples/simple.cpp"),
target="simple",
use=["cli11"],
)