2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 12:22:17 +00:00

simplified coverage options and added docs (#449)

* simplified coverage options and added docs
* fix off must be first to be default
This commit is contained in:
Hans Dembinski
2019-06-09 16:03:10 +02:00
committed by Rene Rivera
parent b9c0b100e7
commit 11bd2898fb
4 changed files with 17 additions and 10 deletions

View File

@@ -352,6 +352,11 @@ The `<warnings-as-errors>` makes it possible to treat warnings as
errors and abort compilation on a warning. The value `on` enables this
behavior. The default value is `off`.
[[bbv2.builtin.features.coverage]]`coverage`::
The `<coverage>` feature controls whether the code is instrumented to
generate coverage data during execution.
The value `on` enables this. The default value is `off`.
[[bbv2.builtin.features.build]]`build`::
*Allowed values:* `no`
+

View File

@@ -197,6 +197,11 @@ def register_globals ():
'on'], # Fail the compilation if there are warnings.
['incidental', 'propagated'])
feature.feature('coverage', [
'off', # Disable coverage generation for the tool.
'on'], # Enable coverage generation for the tool.
['incidental', 'propagated'])
feature.feature('c++-template-depth',
[str(i) for i in range(64,1024+1,64)] +
[str(i) for i in range(20,1000+1,10)] +

View File

@@ -1,12 +1,13 @@
# Copyright 2019 Rene Rivera
# Copyright 2019 Hans Dembinski
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
# What kind of coverage information to generate.
import feature ;
feature.feature coverage
: off all test profile
: propagated optional ;
:
off # Disable coverage generation for the tool (default).
on # Enable coverage generation for the tool.
: incidental propagated ;

View File

@@ -738,9 +738,7 @@ toolset.flags gcc.compile.c++ OPTIONS <address-sanitizer>norecover : -fsanitize=
toolset.flags gcc.compile.c++ OPTIONS <undefined-sanitizer>norecover : -fsanitize=undefined -fno-sanitize-recover=undefined ;
toolset.flags gcc.compile.c++ OPTIONS <thread-sanitizer>norecover : -fsanitize=thread -fno-sanitize-recover=thread ;
toolset.flags gcc.compile.c++ OPTIONS <leak-sanitizer>norecover : -fsanitize=leak -fno-sanitize-recover=leak ;
toolset.flags gcc.compile.c++ OPTIONS <coverage>all : --coverage ;
toolset.flags gcc.compile.c++ OPTIONS <coverage>profile : -fprofile-arcs ;
toolset.flags gcc.compile.c++ OPTIONS <coverage>test : -ftest-coverage ;
toolset.flags gcc.compile.c++ OPTIONS <coverage>on : --coverage ;
# configure Dinkum STL to match compiler options
toolset.flags gcc.compile.c++ DEFINES <rtti>off/<target-os>vxworks : _NO_RTTI ;
@@ -889,9 +887,7 @@ toolset.flags gcc.link OPTIONS <address-sanitizer>norecover : -fsanitize=address
toolset.flags gcc.link OPTIONS <undefined-sanitizer>norecover : -fsanitize=undefined -fno-sanitize-recover=undefined ;
toolset.flags gcc.link OPTIONS <thread-sanitizer>norecover : -fsanitize=thread -fno-sanitize-recover=thread ;
toolset.flags gcc.link OPTIONS <leak-sanitizer>norecover : -fsanitize=leak -fno-sanitize-recover=leak ;
toolset.flags gcc.link OPTIONS <coverage>all : --coverage ;
toolset.flags gcc.link OPTIONS <coverage>profile : -fprofile-arcs ;
toolset.flags gcc.link OPTIONS <coverage>test : -lgcov ;
toolset.flags gcc.link OPTIONS <coverage>on : --coverage ;
toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>windows : "-Wl,--out-implib," ;
toolset.flags gcc.link.dll .IMPLIB-COMMAND <target-os>cygwin : "-Wl,--out-implib," ;