1
0
Fork 0
arangodb/3rdParty/boost/1.62.0/libs/winapi/test/Jamfile.v2

60 lines
2.8 KiB
Plaintext

#
# Copyright Andrey Semashev 2015.
# 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)
import testing ;
import path ;
import regex ;
project
: requirements
# Disable warnings about using 'insecure' standard C functions
<toolset>msvc:<define>_SCL_SECURE_NO_WARNINGS
<toolset>msvc:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>msvc:<define>_CRT_SECURE_NO_WARNINGS
<toolset>msvc:<define>_CRT_SECURE_NO_DEPRECATE
<toolset>intel-win:<define>_SCL_SECURE_NO_WARNINGS
<toolset>intel-win:<define>_SCL_SECURE_NO_DEPRECATE
<toolset>intel-win:<define>_CRT_SECURE_NO_WARNINGS
<toolset>intel-win:<define>_CRT_SECURE_NO_DEPRECATE
: default-build
# Testers typically don't specify threading environment and the library can be built and tested for single and multi. I'm more interested in multi though.
<threading>multi
# <link>static
;
# this rule enumerates through all the sources and invokes
# the run rule for each source, the result is a list of all
# the run rules, which we can pass on to the test_suite rule:
rule test_all
{
local all_rules = ;
local file ;
local headers_path = [ path.make $(BOOST_ROOT)/libs/winapi/include/boost/detail ] ;
for file in [ path.glob-tree $(headers_path) : *.hpp : detail ]
{
local rel_file = [ path.relative-to $(headers_path) $(file) ] ;
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
local test_name = [ regex.replace $(rel_file) "/" "-" ] ;
local decl_test_name = ~hdr-decl-$(test_name) ;
local use_winh_test_name = ~hdr-use-winh-$(test_name) ;
local pre_winh_test_name = ~hdr-pre-winh-$(test_name) ;
local post_winh_test_name = ~hdr-post-winh-$(test_name) ;
#ECHO $(rel_file) ;
all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(decl_test_name) ] ;
all_rules += [ compile compile/decl_header.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <define>"BOOST_USE_WINDOWS_H" <dependency>$(file) : $(use_winh_test_name) ] ;
all_rules += [ compile compile/windows_h_pre.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(pre_winh_test_name) ] ;
all_rules += [ compile compile/windows_h_post.cpp : <define>"BOOST_WINAPI_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(post_winh_test_name) ] ;
}
#ECHO All rules: $(all_rules) ;
return $(all_rules) ;
}
test-suite winapi : [ test_all r ] ;