2009-10-10 20:14:04 +00:00
|
|
|
# Latest jamplus is needed to use this
|
2009-10-28 20:08:43 +00:00
|
|
|
|
2009-10-10 20:14:04 +00:00
|
|
|
# Targets:
|
|
|
|
# pugixml - build pugixml library
|
|
|
|
# tests - build pugixml test suite
|
|
|
|
# run_tests - run pugixml test suite
|
|
|
|
# coverage - get test suite coverage
|
|
|
|
|
2009-10-28 20:08:43 +00:00
|
|
|
# Options:
|
|
|
|
# toolset=name - select toolset
|
|
|
|
# supported toolsets: mingw*, msvc*
|
|
|
|
|
|
|
|
# default toolset/configuration
|
|
|
|
if ( ! $(toolset) )
|
|
|
|
{
|
|
|
|
exit You should specify a toolset ;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( ! $(configuration) )
|
|
|
|
{
|
|
|
|
configuration = "debug" ;
|
|
|
|
}
|
2009-10-10 20:14:04 +00:00
|
|
|
|
2009-10-29 07:18:26 +00:00
|
|
|
# remove empty define
|
|
|
|
defines -= "" ;
|
|
|
|
|
2009-10-28 20:08:43 +00:00
|
|
|
# options
|
2009-10-29 07:18:26 +00:00
|
|
|
if ( $(defines) )
|
|
|
|
{
|
2009-10-29 21:47:37 +00:00
|
|
|
BUILD = build/$(toolset)/$(defines:J=_)/$(configuration) ;
|
2009-10-29 07:18:26 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
BUILD = build/$(toolset)/standard/$(configuration) ;
|
|
|
|
}
|
2009-10-28 20:08:43 +00:00
|
|
|
|
2009-11-03 18:29:57 +00:00
|
|
|
if ( $(toolset:I=^mingw) )
|
2009-10-28 20:08:43 +00:00
|
|
|
{
|
|
|
|
CCFLAGS = -fprofile-arcs -ftest-coverage ;
|
|
|
|
LDFLAGS = -fprofile-arcs ;
|
|
|
|
GCOVFLAGS = -n ;
|
2009-11-04 20:52:27 +00:00
|
|
|
|
|
|
|
if ( $(toolset) = mingw44 )
|
|
|
|
{
|
|
|
|
GCOVFLAGS += -o $(BUILD)/src ; # because stupid gcov can't find files via relative paths any more
|
|
|
|
}
|
2009-10-28 20:08:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# rules
|
|
|
|
include "Jamrules.jam" ;
|
2009-10-10 20:14:04 +00:00
|
|
|
|
2009-10-28 20:08:43 +00:00
|
|
|
# targets
|
2009-10-10 20:14:04 +00:00
|
|
|
Library pugixml : src/pugixml.cpp src/pugixpath.cpp ;
|
2009-10-10 21:36:03 +00:00
|
|
|
Application tests : tests/main.cpp [ Glob tests : test_*.cpp ] : pugixml ;
|
2009-10-10 20:14:04 +00:00
|
|
|
Test run_tests : tests ;
|
|
|
|
Coverage coverage : run_tests ;
|