diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/libs/units/test_headers | |
parent | Initial commit. (diff) | |
download | ceph-upstream.tar.xz ceph-upstream.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/boost/libs/units/test_headers')
-rw-r--r-- | src/boost/libs/units/test_headers/Jamfile.v2 | 56 | ||||
-rw-r--r-- | src/boost/libs/units/test_headers/main.cpp | 12 | ||||
-rw-r--r-- | src/boost/libs/units/test_headers/test.cpp | 19 |
3 files changed, 87 insertions, 0 deletions
diff --git a/src/boost/libs/units/test_headers/Jamfile.v2 b/src/boost/libs/units/test_headers/Jamfile.v2 new file mode 100644 index 000000000..8bcd8322a --- /dev/null +++ b/src/boost/libs/units/test_headers/Jamfile.v2 @@ -0,0 +1,56 @@ +# Jamfile.v2 +# +# Copyright (c) 2007-2008 +# Steven Watanabe +# +# 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 ; +import print ; +import sequence ; +import feature ; + +project boost/units/test_headers : + requirements <include>$(BOOST_ROOT) <include>../../.. +; + +headers = [ path.glob-tree ../../../boost/units : *.hpp : detail ] ; + +for local file in $(headers) +{ + compile test.cpp + : # requirements + <define>BOOST_UNITS_HEADER_NAME=$(file) + <dependency>$(file) + : # test name + [ regex.replace [ path.relative-to ../../.. $(file) ] "/" "_" ] ; +} + +feature.feature <generate-include-all-order> : forward reverse : incidental ; + +rule generate-include-all ( target : sources * : properties * ) +{ + print.output $(target) ; + + if <generate-include-all-order>reverse in $(properties) + { + sources = [ sequence.reverse $(sources) ] ; + } + + for local file in $(sources) + { + print.text "#include <$(file:G=)> +" : overwrite ; + } + +} + +make include_all1.cpp : $(headers) : @generate-include-all ; +make include_all2.cpp : $(headers) : @generate-include-all : <generate-include-all-order>reverse ; + +# this ought to catch non-inlined functions and other duplicate definitions +link include_all1.cpp include_all2.cpp main.cpp : <include>. : include_all_headers ; diff --git a/src/boost/libs/units/test_headers/main.cpp b/src/boost/libs/units/test_headers/main.cpp new file mode 100644 index 000000000..a7746ff48 --- /dev/null +++ b/src/boost/libs/units/test_headers/main.cpp @@ -0,0 +1,12 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// 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) + +int main() { +} diff --git a/src/boost/libs/units/test_headers/test.cpp b/src/boost/libs/units/test_headers/test.cpp new file mode 100644 index 000000000..589e974c0 --- /dev/null +++ b/src/boost/libs/units/test_headers/test.cpp @@ -0,0 +1,19 @@ +// Boost.Units - A C++ library for zero-overhead dimensional analysis and +// unit/quantity manipulation and conversion +// +// Copyright (C) 2003-2008 Matthias Christian Schabel +// Copyright (C) 2007-2008 Steven Watanabe +// +// 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) + +#define BOOST_UNITS_STRINGIZE_IMPL(x) #x +#define BOOST_UNITS_STRINGIZE(x) BOOST_UNITS_STRINGIZE_IMPL(x) + +#define BOOST_UNITS_HEADER BOOST_UNITS_STRINGIZE(BOOST_UNITS_HEADER_NAME) + +#include BOOST_UNITS_HEADER +#include BOOST_UNITS_HEADER + +int main() {} |