From 19fcec84d8d7d21e796c7624e521b60d28ee21ed Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:45:59 +0200 Subject: Adding upstream version 16.2.11+ds. Signed-off-by: Daniel Baumann --- src/boost/libs/array/CMakeLists.txt | 24 ++++++ src/boost/libs/array/index.html | 13 ++++ src/boost/libs/array/meta/libraries.json | 17 +++++ src/boost/libs/array/test/Jamfile.v2 | 18 +++++ src/boost/libs/array/test/array0.cpp | 89 ++++++++++++++++++++++ src/boost/libs/array/test/array1.cpp | 58 ++++++++++++++ src/boost/libs/array/test/array2.cpp | 44 +++++++++++ src/boost/libs/array/test/array3.cpp | 62 +++++++++++++++ src/boost/libs/array/test/array4.cpp | 43 +++++++++++ src/boost/libs/array/test/array5.cpp | 72 +++++++++++++++++ src/boost/libs/array/test/array6.cpp | 60 +++++++++++++++ src/boost/libs/array/test/array7.cpp | 66 ++++++++++++++++ src/boost/libs/array/test/array_constexpr.cpp | 39 ++++++++++ src/boost/libs/array/test/array_getfail1.cpp | 50 ++++++++++++ src/boost/libs/array/test/array_getfail2.cpp | 65 ++++++++++++++++ src/boost/libs/array/test/array_hash.cpp | 44 +++++++++++ src/boost/libs/array/test/print.hpp | 27 +++++++ .../libs/array/test/test_cmake/CMakeLists.txt | 22 ++++++ src/boost/libs/array/test/test_cmake/main.cpp | 5 ++ 19 files changed, 818 insertions(+) create mode 100644 src/boost/libs/array/CMakeLists.txt create mode 100644 src/boost/libs/array/index.html create mode 100644 src/boost/libs/array/meta/libraries.json create mode 100644 src/boost/libs/array/test/Jamfile.v2 create mode 100644 src/boost/libs/array/test/array0.cpp create mode 100644 src/boost/libs/array/test/array1.cpp create mode 100644 src/boost/libs/array/test/array2.cpp create mode 100644 src/boost/libs/array/test/array3.cpp create mode 100644 src/boost/libs/array/test/array4.cpp create mode 100644 src/boost/libs/array/test/array5.cpp create mode 100644 src/boost/libs/array/test/array6.cpp create mode 100644 src/boost/libs/array/test/array7.cpp create mode 100644 src/boost/libs/array/test/array_constexpr.cpp create mode 100644 src/boost/libs/array/test/array_getfail1.cpp create mode 100644 src/boost/libs/array/test/array_getfail2.cpp create mode 100644 src/boost/libs/array/test/array_hash.cpp create mode 100644 src/boost/libs/array/test/print.hpp create mode 100644 src/boost/libs/array/test/test_cmake/CMakeLists.txt create mode 100644 src/boost/libs/array/test/test_cmake/main.cpp (limited to 'src/boost/libs/array') diff --git a/src/boost/libs/array/CMakeLists.txt b/src/boost/libs/array/CMakeLists.txt new file mode 100644 index 000000000..9c7c14528 --- /dev/null +++ b/src/boost/libs/array/CMakeLists.txt @@ -0,0 +1,24 @@ +# Copyright 2018 Mike Dev +# 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 + +# NOTE: CMake support for Boost.Array is currently experimental at best +# and the interface is likely to change in the future + +cmake_minimum_required(VERSION 3.5) +project(boost-array LANGUAGES CXX) + +add_library(boost_array INTERFACE) +add_library(Boost::array ALIAS boost_array) + +target_include_directories(boost_array INTERFACE include) + +target_link_libraries(boost_array + INTERFACE + Boost::assert + Boost::config + Boost::core + Boost::static_assert + Boost::throw_exception +) + diff --git a/src/boost/libs/array/index.html b/src/boost/libs/array/index.html new file mode 100644 index 000000000..a9e3c343f --- /dev/null +++ b/src/boost/libs/array/index.html @@ -0,0 +1,13 @@ + + + + + +Automatic redirection failed, please go to +../../doc/html/array.html  
+

© Copyright Beman Dawes, 2001

+

Distributed under the Boost Software License, Version 1.0. (See accompanying +file LICENSE_1_0.txt or copy +at www.boost.org/LICENSE_1_0.txt)

+ + \ No newline at end of file diff --git a/src/boost/libs/array/meta/libraries.json b/src/boost/libs/array/meta/libraries.json new file mode 100644 index 000000000..7710ee25e --- /dev/null +++ b/src/boost/libs/array/meta/libraries.json @@ -0,0 +1,17 @@ +{ + "key": "array", + "name": "Array", + "authors": [ + "Nicolai Josuttis" + ], + "description": "STL compliant container wrapper for arrays of constant size.", + "std": [ + "tr1" + ], + "category": [ + "Containers" + ], + "maintainers": [ + "Marshall Clow " + ] +} diff --git a/src/boost/libs/array/test/Jamfile.v2 b/src/boost/libs/array/test/Jamfile.v2 new file mode 100644 index 000000000..4c29720e9 --- /dev/null +++ b/src/boost/libs/array/test/Jamfile.v2 @@ -0,0 +1,18 @@ +#~ Copyright Rene Rivera 2008 +#~ 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) + +test-suite array : + [ run array0.cpp ] + [ run array1.cpp ] + [ run array2.cpp ] + [ run array3.cpp ] + [ run array4.cpp ] + [ run array5.cpp ] + [ run array6.cpp ] + [ run array7.cpp ] +# [ run array_constexpr.cpp ] + [ compile-fail array_getfail1.cpp ] + [ compile-fail array_getfail2.cpp ] + [ run array_hash.cpp ] + ; diff --git a/src/boost/libs/array/test/array0.cpp b/src/boost/libs/array/test/array0.cpp new file mode 100644 index 000000000..af1d47bb2 --- /dev/null +++ b/src/boost/libs/array/test/array0.cpp @@ -0,0 +1,89 @@ +/* tests for using class array<> specialization for size 0 + * (C) Copyright Alisdair Meredith 2006. + * 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) + */ + +#include +#include +#include + +#include + +namespace { + +template< class T > +void BadValue( const T & ) +{ + BOOST_TEST ( false ); +} + +template< class T > +void RunTests() +{ + typedef boost::array< T, 0 > test_type; + + // Test value and aggegrate initialization + test_type test_case = {}; + const boost::array< T, 0 > const_test_case = test_type(); + + test_case.fill ( T() ); + + // front/back and operator[] must compile, but calling them is undefined + // Likewise, all tests below should evaluate to false, avoiding undefined behaviour + BOOST_TEST ( test_case.empty()); + BOOST_TEST ( const_test_case.empty()); + + BOOST_TEST ( test_case.size() == 0 ); + BOOST_TEST ( const_test_case.size() == 0 ); + + // Assert requirements of TR1 6.2.2.4 + BOOST_TEST ( test_case.begin() == test_case.end()); + BOOST_TEST ( test_case.cbegin() == test_case.cend()); + BOOST_TEST ( const_test_case.begin() == const_test_case.end()); + BOOST_TEST ( const_test_case.cbegin() == const_test_case.cend()); + + BOOST_TEST ( test_case.begin() != const_test_case.begin() ); + if( test_case.data() == const_test_case.data() ) { + // Value of data is unspecified in TR1, so no requirement this test pass or fail + // However, it must compile! + } + + // Check can safely use all iterator types with std algorithms + std::for_each( test_case.begin(), test_case.end(), BadValue< T > ); + std::for_each( test_case.rbegin(), test_case.rend(), BadValue< T > ); + std::for_each( test_case.cbegin(), test_case.cend(), BadValue< T > ); + std::for_each( const_test_case.begin(), const_test_case.end(), BadValue< T > ); + std::for_each( const_test_case.rbegin(), const_test_case.rend(), BadValue< T > ); + std::for_each( const_test_case.cbegin(), const_test_case.cend(), BadValue< T > ); + + // Check swap is well formed + std::swap( test_case, test_case ); + + // Check assignment operator and overloads are well formed + test_case = const_test_case; + + // Confirm at() throws the std lib defined exception + try { + BadValue( test_case.at( 0 )); + } catch ( const std::out_of_range & ) { + } + + try { + BadValue( const_test_case.at( 0 ) ); + } catch ( const std::out_of_range & ) { + } +} + +} + +int main() +{ + RunTests< bool >(); + RunTests< void * >(); + RunTests< long double >(); + RunTests< std::string >(); + + return boost::report_errors(); +} diff --git a/src/boost/libs/array/test/array1.cpp b/src/boost/libs/array/test/array1.cpp new file mode 100644 index 000000000..740968f4e --- /dev/null +++ b/src/boost/libs/array/test/array1.cpp @@ -0,0 +1,58 @@ +/* simple example for using class array<> + * + * (C) Copyright Nicolai M. Josuttis 2001. + * 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) + * + * Changelog: + * 20 Jan 2001 - Removed boolalpha use since stock GCC doesn't support it + * (David Abrahams) + */ + +#include +#include + +int main() +{ + // define special type name + typedef boost::array Array; + + // create and initialize an array + Array a = { { 42 } }; + + // access elements + for (unsigned i=1; i + * (C) Copyright Nicolai M. Josuttis 2001. + * 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) + */ + +#ifndef _SCL_SECURE_NO_WARNINGS +// Suppress warnings from the std lib: +# define _SCL_SECURE_NO_WARNINGS +#endif + +#include +#include +#include +#include "print.hpp" +using namespace std; + +int main() +{ + // create and initialize array + boost::array a = { { 1, 2, 3, 4, 5 } }; + + print_elements(a); + + // modify elements directly + for (unsigned i=0; i()); // operation + print_elements(a); + + return 0; // makes Visual-C++ compiler happy +} + diff --git a/src/boost/libs/array/test/array3.cpp b/src/boost/libs/array/test/array3.cpp new file mode 100644 index 000000000..29aacb125 --- /dev/null +++ b/src/boost/libs/array/test/array3.cpp @@ -0,0 +1,62 @@ +/* example for using class array<> + * (C) Copyright Nicolai M. Josuttis 2001. + * 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) + */ + +#include +#include +#include + +template +void print_elements (const T& x); + +int main() +{ + // create array of four seasons + boost::array seasons = { + { "spring", "summer", "autumn", "winter" } + }; + + // copy and change order + boost::array seasons_orig = seasons; + for (std::size_t i=seasons.size()-1; i>0; --i) { + std::swap(seasons.at(i),seasons.at((i+1)%seasons.size())); + } + + std::cout << "one way: "; + print_elements(seasons); + + // try swap() + std::cout << "other way: "; + std::swap(seasons,seasons_orig); + print_elements(seasons); + + // try reverse iterators + std::cout << "reverse: "; + for (boost::array::reverse_iterator pos + =seasons.rbegin(); pos::const_reverse_iterator pos + =seasons.crbegin(); pos +void print_elements (const T& x) +{ + for (unsigned i=0; i + * (C) Copyright Nicolai M. Josuttis 2001. + * 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) + */ + +#include +#include +#include +#include +#include + +int main() +{ + // array of arrays of seasons + boost::array,2> seasons_i18n = { + { { { "spring", "summer", "autumn", "winter", } }, + { { "Fruehling", "Sommer", "Herbst", "Winter" } } + } + }; + + // for any array of seasons print seasons + for (unsigned i=0; i seasons = seasons_i18n[i]; + for (unsigned j=0; j + * (C) Copyright Nicolai M. Josuttis 2001. + * 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) + */ + +#include +#include + +template +void test_static_size (const T& cont) +{ + int tmp[T::static_size]; + for (unsigned i=0; i Array; + + // create and initialize an array + const Array a = { { 42.42f } }; + + // use some common STL container operations + std::cout << "static_size: " << a.size() << std::endl; + std::cout << "size: " << a.size() << std::endl; + // Can't use std::boolalpha because it isn't portable + std::cout << "empty: " << (a.empty()? "true" : "false") << std::endl; + std::cout << "max_size: " << a.max_size() << std::endl; + std::cout << "front: " << a.front() << std::endl; + std::cout << "back: " << a.back() << std::endl; + std::cout << "[0]: " << a[0] << std::endl; + std::cout << "elems: "; + + // iterate through all elements + for (Array::const_iterator pos=a.begin(); pos DArray; + typedef boost::array IArray; + IArray ia = { { 1, 2, 3, 4, 5, 6 } } ; // extra braces silence GCC warning + DArray da; + da = ia; + da.assign(42); + + return 0; // makes Visual-C++ compiler happy +} + diff --git a/src/boost/libs/array/test/array6.cpp b/src/boost/libs/array/test/array6.cpp new file mode 100644 index 000000000..d2cca910c --- /dev/null +++ b/src/boost/libs/array/test/array6.cpp @@ -0,0 +1,60 @@ +/* tests for using class array<> specialization for size 0 + * (C) Copyright Alisdair Meredith 2006. + * 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) + */ + +#include +#include +#include +#include + +#include + +namespace { + template< class T > + void RunTests() + { + typedef boost::array< T, 5 > test_type; + typedef T arr[5]; + test_type test_case; // = { 1, 1, 2, 3, 5 }; + + arr &aRef = get_c_array ( test_case ); + BOOST_TEST ( &*test_case.begin () == &aRef[0] ); + + const arr &caRef = get_c_array ( test_case ); + typename test_type::const_iterator iter = test_case.begin (); + BOOST_TEST ( &*iter == &caRef[0] ); + + // Confirm at() throws the std lib defined exception + try { + test_case.at( test_case.size()); + BOOST_TEST(false); + } + catch ( const std::out_of_range & ) {} + + try { + test_case.at( test_case.size() + 1); + BOOST_TEST(false); + } + catch ( const std::out_of_range & ) {} + + try { + test_case.at( test_case.size() + 100); + BOOST_TEST(false); + } + catch ( const std::out_of_range & ) {} + } +} + +int main () +{ + RunTests< bool >(); + RunTests< void * >(); + RunTests< long double >(); + RunTests< std::string >(); + + return boost::report_errors(); +} + diff --git a/src/boost/libs/array/test/array7.cpp b/src/boost/libs/array/test/array7.cpp new file mode 100644 index 000000000..567b2e61a --- /dev/null +++ b/src/boost/libs/array/test/array7.cpp @@ -0,0 +1,66 @@ +/* tests using std::get on boost:array + * (C) Copyright Marshall Clow 2012 + * 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) + */ + +#include +#include +#include +#include +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#include + +namespace { + + #ifndef BOOST_NO_CXX11_HDR_ARRAY + template< class T > + void RunStdTests() + { + typedef boost::array< T, 5 > test_type; + test_type test_case; // = { 1, 1, 2, 3, 5 }; + + T &aRef = std::get<0> ( test_case ); + BOOST_TEST ( &*test_case.begin () == &aRef ); + + const T &caRef = std::get<0> ( test_case ); + BOOST_TEST ( &*test_case.cbegin () == &caRef ); + } + #endif + + template< class T > + void RunBoostTests() + { + typedef boost::array< T, 5 > test_type; + test_type test_case; // = { 1, 1, 2, 3, 5 }; + + T &aRef = boost::get<0> ( test_case ); + BOOST_TEST ( &*test_case.begin () == &aRef ); + + const T &caRef = boost::get<0> ( test_case ); + BOOST_TEST ( &*test_case.cbegin () == &caRef ); + } + +} + +int main() +{ + RunBoostTests< bool >(); + RunBoostTests< void * >(); + RunBoostTests< long double >(); + RunBoostTests< std::string >(); + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + RunStdTests< bool >(); + RunStdTests< void * >(); + RunStdTests< long double >(); + RunStdTests< std::string >(); +#endif + + return boost::report_errors(); +} + diff --git a/src/boost/libs/array/test/array_constexpr.cpp b/src/boost/libs/array/test/array_constexpr.cpp new file mode 100644 index 000000000..a3110057a --- /dev/null +++ b/src/boost/libs/array/test/array_constexpr.cpp @@ -0,0 +1,39 @@ +/* tests using constexpr on boost:array + * (C) Copyright Marshall Clow 2012 + * 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) + */ + +#include +#include +#include +#include +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#ifndef BOOST_NO_CXX11_CONSTEXPR +constexpr boost::array arr {{ 0,1,2,3,4,5,6,7,8,9 }}; +constexpr std::array arr_std {{ 0,1,2,3,4,5,6,7,8,9 }}; + +template +void sink ( T t ) {} + +template +void sink ( boost::array &arr ) {} + +int main() +{ +// constexpr int two = arr_std.at (2); + constexpr int three = arr.at (3); + int whatever [ arr.at(4) ]; + (void)three; + (void) whatever; +} + +#else // no constexpr means no constexpr tests! +int main() +{ +} +#endif diff --git a/src/boost/libs/array/test/array_getfail1.cpp b/src/boost/libs/array/test/array_getfail1.cpp new file mode 100644 index 000000000..d89b1ff1a --- /dev/null +++ b/src/boost/libs/array/test/array_getfail1.cpp @@ -0,0 +1,50 @@ +/* tests using std::get on boost:array + * (C) Copyright Marshall Clow 2012 + * 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) + */ + +#include +#include + + +#include +#include +#include +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#include + +namespace { + + #ifndef BOOST_NO_CXX11_HDR_ARRAY + template< class T > + void RunStdTests() + { + typedef boost::array< T, 5 > test_type; + typedef T arr[5]; + test_type test_case; // = { 1, 1, 2, 3, 5 }; + + T &aRef = std::get<5> ( test_case ); // should fail to compile + BOOST_TEST ( &*test_case.begin () == &aRef ); + } + #endif + +} + +int main() +{ +#ifndef BOOST_NO_CXX11_HDR_ARRAY + RunStdTests< bool >(); + RunStdTests< void * >(); + RunStdTests< long double >(); + RunStdTests< std::string >(); +#else + BOOST_STATIC_ASSERT ( false ); // fail on C++03 systems. +#endif + + return boost::report_errors(); +} diff --git a/src/boost/libs/array/test/array_getfail2.cpp b/src/boost/libs/array/test/array_getfail2.cpp new file mode 100644 index 000000000..d8073dba9 --- /dev/null +++ b/src/boost/libs/array/test/array_getfail2.cpp @@ -0,0 +1,65 @@ +/* tests using std::get on boost:array + * (C) Copyright Marshall Clow 2012 + * 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) + */ + +#include +#include +#include +#include +#ifndef BOOST_NO_CXX11_HDR_ARRAY +#include +#endif + +#include + +namespace { + + #ifndef BOOST_NO_CXX11_HDR_ARRAY + template< class T > + void RunStdTests() + { + typedef boost::array< T, 5 > test_type; + typedef T arr[5]; + test_type test_case; // = { 1, 1, 2, 3, 5 }; + + T &aRef = std::get<0> ( test_case ); + BOOST_TEST ( &*test_case.begin () == &aRef ); + + const T &caRef = std::get<0> ( test_case ); + BOOST_TEST ( &*test_case.cbegin () == &caRef ); + } + #endif + + template< class T > + void RunBoostTests() + { + typedef boost::array< T, 5 > test_type; + typedef T arr[5]; + test_type test_case; // = { 1, 1, 2, 3, 5 }; + + T &aRef = boost::get<5> ( test_case ); + BOOST_TEST ( &*test_case.begin () == &aRef ); + } + +} + +int main() +{ + RunBoostTests< bool >(); + RunBoostTests< void * >(); + RunBoostTests< long double >(); + RunBoostTests< std::string >(); + +#ifndef BOOST_NO_CXX11_HDR_ARRAY + RunStdTests< bool >(); + RunStdTests< void * >(); + RunStdTests< long double >(); + RunStdTests< std::string >(); +#endif + + return boost::report_errors(); +} + diff --git a/src/boost/libs/array/test/array_hash.cpp b/src/boost/libs/array/test/array_hash.cpp new file mode 100644 index 000000000..f22fc5109 --- /dev/null +++ b/src/boost/libs/array/test/array_hash.cpp @@ -0,0 +1,44 @@ +/* tests for using boost::hash with boost::array + * (C) Copyright Marshall Clow 2012 + * 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) + */ + +#include +#include +#include +#include +#include + +#include + +namespace { + + template< class T > + void RunTests() + { + // std::size_t hash0 = boost::hash > () ( boost::array ()); + // std::size_t hash1 = boost::hash > () ( boost::array ()); + + typedef boost::array< T, 5 > barr; + typedef T arr[5]; + barr test_barr = {{ 1, 1, 2, 3, 5 }}; + arr test_arr = { 1, 1, 2, 3, 5 }; + + std::size_t bhash = boost::hash () ( test_barr ); + std::size_t ahash = boost::hash () ( test_arr ); + BOOST_TEST ( ahash == bhash ); + } + +} + +int main() +{ + RunTests< int >(); + RunTests< long >(); + RunTests< long double >(); + + return boost::report_errors(); +} + diff --git a/src/boost/libs/array/test/print.hpp b/src/boost/libs/array/test/print.hpp new file mode 100644 index 000000000..6d68e8e1b --- /dev/null +++ b/src/boost/libs/array/test/print.hpp @@ -0,0 +1,27 @@ +/* The following code example is taken from the book + * "The C++ Standard Library - A Tutorial and Reference" + * by Nicolai M. Josuttis, Addison-Wesley, 1999 + * + * (C) Copyright Nicolai M. Josuttis 1999. + * 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) + */ +#include + +/* print_elements() + * - prints optional C-string optcstr followed by + * - all elements of the collection coll + * - separated by spaces + */ +template +inline void print_elements (const T& coll, const char* optcstr="") +{ + typename T::const_iterator pos; + + std::cout << optcstr; + for (pos=coll.begin(); pos!=coll.end(); ++pos) { + std::cout << *pos << ' '; + } + std::cout << std::endl; +} diff --git a/src/boost/libs/array/test/test_cmake/CMakeLists.txt b/src/boost/libs/array/test/test_cmake/CMakeLists.txt new file mode 100644 index 000000000..d1bce85a2 --- /dev/null +++ b/src/boost/libs/array/test/test_cmake/CMakeLists.txt @@ -0,0 +1,22 @@ +# Copyright 2018 Mike Dev +# 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 +# +# NOTE: This does NOT run the unit tests for Boost.Array. +# It only tests, if the CMakeLists.txt file in it's root works as expected + +cmake_minimum_required( VERSION 3.5 ) + +project( BoostBindCMakeSelfTest ) + +add_subdirectory( ../../../assert ${CMAKE_CURRENT_BINARY_DIR}/libs/assert ) +add_subdirectory( ../../../config ${CMAKE_CURRENT_BINARY_DIR}/libs/config ) +add_subdirectory( ../../../core ${CMAKE_CURRENT_BINARY_DIR}/libs/core ) +add_subdirectory( ../../../static_assert ${CMAKE_CURRENT_BINARY_DIR}/libs/static_assert ) +add_subdirectory( ../../../throw_exception ${CMAKE_CURRENT_BINARY_DIR}/libs/thorw_exception ) + +add_subdirectory( ../.. ${CMAKE_CURRENT_BINARY_DIR}/libs/boost_array ) + +add_executable( boost_array_cmake_self_test main.cpp ) +target_link_libraries( boost_array_cmake_self_test Boost::array ) + diff --git a/src/boost/libs/array/test/test_cmake/main.cpp b/src/boost/libs/array/test/test_cmake/main.cpp new file mode 100644 index 000000000..c2e0c905c --- /dev/null +++ b/src/boost/libs/array/test/test_cmake/main.cpp @@ -0,0 +1,5 @@ +#include + +int main() { + boost::array a{}; +} \ No newline at end of file -- cgit v1.2.3