diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0db2e8b4..2c2a8db92 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -266,7 +266,7 @@ jobs: shell: cmd run: | cd ../boost-root - b2 -j1 libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} ${{matrix.cxxflags}} variant=debug,release embed-manifest-via=linker + b2 -j1 --abbreviate-paths libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} ${{matrix.cxxflags}} variant=debug,release embed-manifest-via=linker posix-cmake-subdir: strategy: diff --git a/include/boost/property_tree/detail/exception_implementation.hpp b/include/boost/property_tree/detail/exception_implementation.hpp index cd3434ae4..77cf9bc4a 100644 --- a/include/boost/property_tree/detail/exception_implementation.hpp +++ b/include/boost/property_tree/detail/exception_implementation.hpp @@ -11,6 +11,10 @@ #ifndef BOOST_PROPERTY_TREE_DETAIL_EXCEPTIONS_IMPLEMENTATION_HPP_INCLUDED #define BOOST_PROPERTY_TREE_DETAIL_EXCEPTIONS_IMPLEMENTATION_HPP_INCLUDED +#include + +#include + namespace boost { namespace property_tree { diff --git a/include/boost/property_tree/detail/file_parser_error.hpp b/include/boost/property_tree/detail/file_parser_error.hpp index c0c7ef4cd..4ed45b497 100644 --- a/include/boost/property_tree/detail/file_parser_error.hpp +++ b/include/boost/property_tree/detail/file_parser_error.hpp @@ -12,6 +12,7 @@ #include #include +#include namespace boost { namespace property_tree { diff --git a/include/boost/property_tree/detail/info_parser_write.hpp b/include/boost/property_tree/detail/info_parser_write.hpp index 31ce6dd0d..1aa6c5534 100644 --- a/include/boost/property_tree/detail/info_parser_write.hpp +++ b/include/boost/property_tree/detail/info_parser_write.hpp @@ -10,8 +10,11 @@ #ifndef BOOST_PROPERTY_TREE_DETAIL_INFO_PARSER_WRITE_HPP_INCLUDED #define BOOST_PROPERTY_TREE_DETAIL_INFO_PARSER_WRITE_HPP_INCLUDED -#include "boost/property_tree/ptree.hpp" -#include "boost/property_tree/detail/info_parser_utils.hpp" +#include +#include +#include +#include + #include namespace boost { namespace property_tree { namespace info_parser diff --git a/include/boost/property_tree/detail/ptree_implementation.hpp b/include/boost/property_tree/detail/ptree_implementation.hpp index 1af65ca84..1f2d8444a 100644 --- a/include/boost/property_tree/detail/ptree_implementation.hpp +++ b/include/boost/property_tree/detail/ptree_implementation.hpp @@ -11,6 +11,7 @@ #ifndef BOOST_PROPERTY_TREE_DETAIL_PTREE_IMPLEMENTATION_HPP_INCLUDED #define BOOST_PROPERTY_TREE_DETAIL_PTREE_IMPLEMENTATION_HPP_INCLUDED +#include #include #include #include diff --git a/include/boost/property_tree/json_parser/detail/write.hpp b/include/boost/property_tree/json_parser/detail/write.hpp index db89b29e6..71071f074 100644 --- a/include/boost/property_tree/json_parser/detail/write.hpp +++ b/include/boost/property_tree/json_parser/detail/write.hpp @@ -10,6 +10,7 @@ #ifndef BOOST_PROPERTY_TREE_DETAIL_JSON_PARSER_WRITE_HPP_INCLUDED #define BOOST_PROPERTY_TREE_DETAIL_JSON_PARSER_WRITE_HPP_INCLUDED +#include #include #include #include diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index ca3ff10ae..736771d5b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -7,6 +7,8 @@ # http://www.boost.org/LICENSE_1_0.txt) # bring in rules for testing +import path ; +import regex ; import testing ; project @@ -32,6 +34,13 @@ run test_xml_parser_rapidxml.cpp ; run test_multi_module1.cpp test_multi_module2.cpp ; +# Ensure that all headers are self-contained. +for local file in [ glob-tree-ex ../include : *.hpp ] +{ + local rel_name = [ path.relative-to ../include $(file) ] ; + compile self_contained_header.cpp : HEADER_PATH=$(rel_name) : [ regex.replace $(rel_name) "/" "_" ] ; +} + compile ../examples/custom_data_type.cpp ; compile ../examples/debug_settings.cpp ; compile ../examples/empty_ptree_trick.cpp ; diff --git a/test/self_contained_header.cpp b/test/self_contained_header.cpp new file mode 100644 index 000000000..b168b42b4 --- /dev/null +++ b/test/self_contained_header.cpp @@ -0,0 +1,3 @@ +#define INCLUDE_HEADER() + +#include INCLUDE_HEADER()