diff --git a/.drone/drone.bat b/.drone/drone.bat index 66aaf78d..3f874adf 100644 --- a/.drone/drone.bat +++ b/.drone/drone.bat @@ -20,4 +20,4 @@ b2 -d0 headers if not "%CXXSTD%" == "" set CXXSTD=cxxstd=%CXXSTD% if not "%ADDRMD%" == "" set ADDRMD=address-model=%ADDRMD% -b2 -j3 libs/%LIBRARY%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker +b2 --abbreviate-paths -j3 libs/%LIBRARY%/test toolset=%TOOLSET% %CXXSTD% %ADDRMD% variant=debug,release embed-manifest-via=linker diff --git a/include/boost/unordered/detail/foa/node_map_types.hpp b/include/boost/unordered/detail/foa/node_map_types.hpp index 473d97d7..ccb378ef 100644 --- a/include/boost/unordered/detail/foa/node_map_types.hpp +++ b/include/boost/unordered/detail/foa/node_map_types.hpp @@ -5,6 +5,8 @@ #ifndef BOOST_UNORDERED_DETAIL_FOA_NODE_MAP_TYPES_HPP #define BOOST_UNORDERED_DETAIL_FOA_NODE_MAP_TYPES_HPP +#include + #include #include #include diff --git a/include/boost/unordered/detail/foa/node_set_types.hpp b/include/boost/unordered/detail/foa/node_set_types.hpp index 4d01d2fe..710ac6cc 100644 --- a/include/boost/unordered/detail/foa/node_set_types.hpp +++ b/include/boost/unordered/detail/foa/node_set_types.hpp @@ -5,6 +5,8 @@ #ifndef BOOST_UNORDERED_DETAIL_FOA_NODE_SET_TYPES_HPP #define BOOST_UNORDERED_DETAIL_FOA_NODE_SET_TYPES_HPP +#include + #include #include #include diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 9313c7c1..93a28ca6 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -4,9 +4,13 @@ # 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 path ; +import regex ; import testing ; import ../../config/checks/config : requires ; +path-constant TOP : . ; + # Adding -Wundef is blocked on (at least) # https://github.com/boostorg/type_traits/issues/165 @@ -52,6 +56,39 @@ path-constant BOOST_UNORDERED_TEST_DIR : . ; run quick.cpp ; +compile unordered/self_include_tests_obj.cpp + : BOOST_UNORDERED_HEADER="boost/unordered_map.hpp" + : tl_unordered_map_hpp ; + +compile unordered/self_include_tests_obj.cpp + : BOOST_UNORDERED_HEADER="boost/unordered_set.hpp" + : tl_unordered_set_hpp ; + +local include_root = [ path.make $(TOP)/../include ] ; +local headers = [ path.glob-tree $(include_root)/boost/unordered : *.hpp ] ; + +local paths ; +local sanitized_paths ; + +for local header in $(headers) +{ + local path = [ path.relative-to $(include_root) $(header) ] ; + + local sanitized = [ path.relative-to "$(include_root)/boost/unordered" $(header) ] ; + sanitized = [ regex.replace $(sanitized) "[/.\\]" "_" ] ; + + paths += $(path) ; + sanitized_paths += $(sanitized) ; + + compile unordered/self_include_tests_obj.cpp + : BOOST_UNORDERED_HEADER="$(path)" : $(sanitized) ; +} + +alias include_tests + : tl_unordered_map_hpp + tl_unordered_set_hpp + $(sanitized_paths) ; + local FCA_TESTS = allocator_traits assign_tests @@ -274,6 +311,7 @@ for local container in $(MMAP_CONTAINERS) } alias foa_mmap_tests : foa_mmap_$(MMAP_CONTAINERS)_tests ; + alias foa_tests : foa_$(FOA_TESTS) foa_$(FOA_EXCEPTION_TESTS) diff --git a/test/unordered/self_include_tests_obj.cpp b/test/unordered/self_include_tests_obj.cpp new file mode 100644 index 00000000..420dc3a9 --- /dev/null +++ b/test/unordered/self_include_tests_obj.cpp @@ -0,0 +1,9 @@ +#ifndef BOOST_UNORDERED_HEADER +#error "this test requires a class template be passed as a macro" +#endif + +#define STRINGIZE(text) STRINGIZE_I(text) +#define STRINGIZE_I(...) #__VA_ARGS__ + +#define HEADER STRINGIZE(BOOST_UNORDERED_HEADER) +#include HEADER