Cleanup self-include tests to compile solely as object files

This commit is contained in:
Christian Mazakas
2023-09-19 08:50:03 -07:00
parent 6f0a715541
commit 7b24cf6607
2 changed files with 20 additions and 21 deletions

View File

@ -56,6 +56,25 @@ path-constant BOOST_UNORDERED_TEST_DIR : . ;
run quick.cpp ;
local include_root = [ path.make $(TOP)/../include ] ;
local headers = [ path.glob-tree $(include_root)/boost : *.hpp ] ;
local paths ;
local sanitized_paths ;
for local header in $(headers)
{
local path = [ path.relative-to $(include_root) $(header) ] ;
local sanitized = [ regex.replace $(path) "[/.\\]" "_" ] ;
paths += $(path) ;
sanitized_paths += $(sanitized) ;
compile unordered/self_include_tests_obj.cpp
: <define>BOOST_UNORDERED_HEADER="$(path)" : foa_$(sanitized)_self_include_tests ;
}
alias foa_self_include_tests : foa_$(sanitized_paths)_self_include_tests ;
local FCA_TESTS =
allocator_traits
assign_tests
@ -279,24 +298,6 @@ for local container in $(MMAP_CONTAINERS)
alias foa_mmap_tests : foa_mmap_$(MMAP_CONTAINERS)_tests ;
local include_root = [ path.make $(TOP)/../include ] ;
local headers = [ path.glob-tree $(include_root)/boost : *.hpp ] ;
local paths ;
local sanitized_paths ;
for local header in $(headers)
{
local path = [ path.relative-to $(include_root) $(header) ] ;
local sanitized = [ regex.replace $(path) "[/.\\]" "_" ] ;
paths += $(path) ;
sanitized_paths += $(sanitized) ;
run unordered/self_include_tests.cpp : : : <define>BOOST_UNORDERED_HEADER="$(path)" : foa_$(sanitized)_self_include_tests ;
}
alias foa_self_include_tests : foa_$(sanitized_paths)_self_include_tests ;
alias foa_tests :
foa_$(FOA_TESTS)
foa_$(FOA_EXCEPTION_TESTS)

View File

@ -1,5 +1,5 @@
#ifndef BOOST_UNORDERED_HEADER
#error "this requires a class template be passed as a macro"
#error "this test requires a class template be passed as a macro"
#endif
#define STRINGIZE(text) STRINGIZE_I(text)
@ -7,5 +7,3 @@
#define HEADER STRINGIZE(BOOST_UNORDERED_HEADER)
#include HEADER
int main() {}