1 # Boost.GIL (Generic Image Library) - tests
3 # Copyright (c) 2018 Mateusz Loskot <mateusz@loskot.net>
4 # Copyright (c) 2018 Dmitry Arkhipov
6 # Distributed under the Boost Software License, Version 1.0.
7 # (See accompanying file LICENSE_1_0.txt or
8 # copy at http://www.boost.org/LICENSE_1_0.txt)
14 rule generate_self_contained_headers ( headers_subpath * : exclude_subpaths * )
16 # On CI services, test the self-contained headers on-demand only to avoid build timeouts
17 # CI environment is common for Travis CI, AppVeyor, CircleCI, etc.
19 # if ! [ os.environ CI ] || [ os.environ TEST_HEADERS ] {
20 # alias self_contained_headers : [ generate_self_contained_headers ] ;
25 # NOTE: All '/' in test names are replaced with '-' because apparently
26 # test scripts have a problem with test names containing slashes.
28 local top_headers_path = [ path.make $(BOOST_ROOT)/libs/gil/include/boost/gil ] ;
30 for local file in [ path.glob-tree $(top_headers_path)/$(headers_subpath) : *.hpp : $(exclude_subpaths) ]
32 local rel_file = [ path.relative-to $(top_headers_path) $(file) ] ;
33 local target_name = [ regex.replace h/$(rel_file) "/" "-" ] ;
34 local target_name = [ regex.replace $(target_name) "\.hpp" "" ] ;
36 compile $(BOOST_ROOT)/libs/gil/test/headers/main.cpp
37 : <define>"BOOST_GIL_TEST_HEADER=$(rel_file)" <dependency>$(file)
45 # TODO: Review sorting to get as close as possible from general to specific
48 alias concepts : [ generate_self_contained_headers concepts ] ;
49 alias core : [ generate_self_contained_headers : concepts extension io ] ;
50 alias io : [ generate_self_contained_headers io : concepts extension ] ;
53 alias extension/dynamic_image : [ generate_self_contained_headers extension/dynamic_image ] ;
54 alias extension/io : [ generate_self_contained_headers extension/io ] ;
55 alias extension/numeric : [ generate_self_contained_headers extension/numeric ] ;
56 alias extension/toolbox : [ generate_self_contained_headers extension/toolbox ] ;