add COVERAGE configure option - only set coverage flags on libmapnik and plugins - refs #3344
This commit is contained in:
parent
fde36984de
commit
833703026d
6 changed files with 23 additions and 7 deletions
2
Makefile
2
Makefile
|
@ -81,6 +81,8 @@ clean:
|
|||
@find ./src/ -name "*.so" -exec rm {} \;
|
||||
@find ./ -name "*.o" -exec rm {} \;
|
||||
@find ./src/ -name "*.a" -exec rm {} \;
|
||||
@find ./ -name "*.gcda" -exec rm {} \;
|
||||
@find ./ -name "*.gcno" -exec rm {} \;
|
||||
|
||||
distclean:
|
||||
if test -e "config.py"; then mv "config.py" "config.py.backup"; fi
|
||||
|
|
|
@ -293,6 +293,7 @@ opts.AddVariables(
|
|||
EnumVariable('OPTIMIZATION','Set compiler optimization level','3', ['0','1','2','3','4','s']),
|
||||
# Note: setting DEBUG=True will override any custom OPTIMIZATION level
|
||||
BoolVariable('DEBUG', 'Compile a debug version of Mapnik', 'False'),
|
||||
BoolVariable('COVERAGE', 'Compile a libmapnik and plugins with --coverage', 'False'),
|
||||
BoolVariable('DEBUG_UNDEFINED', 'Compile a version of Mapnik using clang/llvm undefined behavior asserts', 'False'),
|
||||
BoolVariable('DEBUG_SANITIZE', 'Compile a version of Mapnik using clang/llvm address sanitation', 'False'),
|
||||
ListVariable('INPUT_PLUGINS','Input drivers to include',DEFAULT_PLUGINS,PLUGINS.keys()),
|
||||
|
@ -1139,6 +1140,9 @@ if not preconfigured:
|
|||
else:
|
||||
mode = 'release mode'
|
||||
|
||||
if env['COVERAGE']:
|
||||
mode += ' (with coverage)'
|
||||
|
||||
env['PLATFORM'] = platform.uname()[0]
|
||||
color_print(4,"Configuring on %s in *%s*..." % (env['PLATFORM'],mode))
|
||||
|
||||
|
@ -1891,6 +1895,10 @@ if not HELP_REQUESTED:
|
|||
|
||||
plugin_base = env.Clone()
|
||||
|
||||
if env['COVERAGE']:
|
||||
plugin_base.Append(LINKFLAGS='--coverage')
|
||||
plugin_base.Append(CXXFLAGS='--coverage')
|
||||
|
||||
Export('plugin_base')
|
||||
|
||||
if env['FAST']:
|
||||
|
|
|
@ -82,8 +82,7 @@ config_override () {
|
|||
configure () {
|
||||
if enabled ${COVERAGE}; then
|
||||
./configure "$@" PGSQL2SQLITE=False SVG2PNG=False SVG_RENDERER=False \
|
||||
CUSTOM_LDFLAGS='--coverage' CUSTOM_CXXFLAGS='--coverage' \
|
||||
CUSTOM_CFLAGS='--coverage' DEBUG=True
|
||||
COVERAGE=True DEBUG=True
|
||||
elif enabled ${MASON_PUBLISH}; then
|
||||
export MASON_NAME=mapnik
|
||||
export MASON_VERSION=latest
|
||||
|
@ -101,9 +100,10 @@ configure () {
|
|||
|
||||
coverage () {
|
||||
./mason_packages/.link/bin/cpp-coveralls \
|
||||
--build-root . --gcov-options '\-lp' --exclude mason_packages \
|
||||
--build-root . --gcov-options '\-lp' \
|
||||
--exclude mason_packages \
|
||||
--exclude .sconf_temp --exclude benchmark --exclude deps \
|
||||
--exclude scons --exclude test --exclude demo --exclude docs \
|
||||
--exclude fonts --exclude utils \
|
||||
--exclude fonts \
|
||||
> /dev/null
|
||||
}
|
||||
|
|
|
@ -62,6 +62,10 @@ system = 'boost_system%s' % env['BOOST_APPEND']
|
|||
lib_env['LIBS'] = [filesystem,
|
||||
regex]
|
||||
|
||||
if env['COVERAGE']:
|
||||
lib_env.Append(LINKFLAGS='--coverage')
|
||||
lib_env.Append(CXXFLAGS='--coverage')
|
||||
|
||||
if env['HAS_CAIRO']:
|
||||
lib_env.Append(LIBS=env['CAIRO_ALL_LIBS'])
|
||||
|
||||
|
|
|
@ -24,8 +24,9 @@ import glob
|
|||
from copy import copy
|
||||
|
||||
Import ('env')
|
||||
Import ('plugin_base')
|
||||
|
||||
program_env = env.Clone()
|
||||
program_env = plugin_base.Clone()
|
||||
|
||||
source = Split(
|
||||
"""
|
||||
|
@ -36,7 +37,6 @@ source = Split(
|
|||
"""
|
||||
)
|
||||
|
||||
#headers = ['#plugins/input/shape'] + env['CPPPATH']
|
||||
headers = env['CPPPATH']
|
||||
|
||||
boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND']
|
||||
|
|
|
@ -25,7 +25,9 @@ from copy import copy
|
|||
|
||||
Import ('env')
|
||||
|
||||
program_env = env.Clone()
|
||||
Import ('plugin_base')
|
||||
|
||||
program_env = plugin_base.Clone()
|
||||
|
||||
source = Split(
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue