Compare commits

...

7 Commits

Author SHA1 Message Date
René Ferdinand Rivera Morell
333c304d84 Add support for modular build structure. (#36)
* Make the library modular usable.

* Switch to library requirements instead of source. As source puts extra source in install targets.

* Add requires-b2 check to top-level build file.

* Bump B2 require to 5.2

* Change all <source> references to <library>.

* Update copyright dates.

* Move inter-lib dependencies to a project variable and into the build targets.

* Switch to /boost/test//included target for header only mode of Boost.Test.

* Update build deps.

* Add GHA CI with simpler working one based on alandefreitas/cpp-actions utilities.

* Move project global include to target local include.

* Only msvc gets minor version tests.

* Remove GHA CI to undo move to cpp-actions.
2025-06-26 02:51:42 +03:00
Peter Dimov
0c5348bef7 Add CMakeLists.txt 2021-05-28 00:46:21 +03:00
Peter Dimov
dfbe377927 Merge branch 'master' into develop 2021-05-28 00:45:40 +03:00
Edward Diener
e8140d8183 Add "cxxstd" json field 2021-01-20 15:58:46 -05:00
Glen Fernandes
3b40572055 Merge branch 'develop' 2019-12-17 08:42:23 -05:00
Glen Fernandes
eab203a2c5 Update Travis configuration 2019-12-17 08:41:00 -05:00
Glen Fernandes
e6f210c7ca Correct all guard macros to conform to Boost guidelines 2019-12-16 19:27:19 -05:00
23 changed files with 191 additions and 62 deletions

View File

@@ -5,6 +5,8 @@ language: cpp
sudo: false sudo: false
dist: trusty
python: "2.7" python: "2.7"
branches: branches:
@@ -97,7 +99,6 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux - os: linux
dist: trusty
compiler: g++-7 compiler: g++-7
env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17 env: TOOLSET=gcc COMPILER=g++-7 CXXSTD=03,11,14,17
addons: addons:
@@ -109,7 +110,7 @@ matrix:
- os: linux - os: linux
compiler: g++-8 compiler: g++-8
env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17 env: TOOLSET=gcc COMPILER=g++-8 CXXSTD=03,11,14,17,2a
addons: addons:
apt: apt:
packages: packages:
@@ -117,10 +118,36 @@ matrix:
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- os: linux
compiler: g++-9
env: TOOLSET=gcc COMPILER=g++-9 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
- g++-9
sources:
- ubuntu-toolchain-r-test
- os: linux - os: linux
compiler: clang++ compiler: clang++
env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11 env: TOOLSET=clang COMPILER=clang++ CXXSTD=03,11
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
addons:
apt:
packages:
- clang-3.3
- os: linux
compiler: /usr/bin/clang++
env: TOOLSET=clang COMPILER=/usr/bin/clang++ CXXSTD=03,11
addons:
apt:
packages:
- clang-3.4
- os: linux - os: linux
compiler: clang++-3.5 compiler: clang++-3.5
env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z env: TOOLSET=clang COMPILER=clang++-3.5 CXXSTD=03,11,14,1z
@@ -131,6 +158,7 @@ matrix:
- libstdc++-4.9-dev - libstdc++-4.9-dev
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
- os: linux - os: linux
compiler: clang++-3.6 compiler: clang++-3.6
@@ -139,9 +167,20 @@ matrix:
apt: apt:
packages: packages:
- clang-3.6 - clang-3.6
- libstdc++-4.9-dev
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.6
- os: linux
compiler: clang++-3.7
env: TOOLSET=clang COMPILER=clang++-3.7 CXXSTD=03,11,14,1z
addons:
apt:
packages:
- clang-3.7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.7
- os: linux - os: linux
compiler: clang++-3.8 compiler: clang++-3.8
@@ -153,6 +192,7 @@ matrix:
- libstdc++-4.9-dev - libstdc++-4.9-dev
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
- os: linux - os: linux
compiler: clang++-3.9 compiler: clang++-3.9
@@ -164,6 +204,7 @@ matrix:
- libstdc++-4.9-dev - libstdc++-4.9-dev
sources: sources:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.9
- os: linux - os: linux
compiler: clang++-4.0 compiler: clang++-4.0
@@ -189,7 +230,7 @@ matrix:
- os: linux - os: linux
compiler: clang++-6.0 compiler: clang++-6.0
env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17 env: TOOLSET=clang COMPILER=clang++-6.0 CXXSTD=03,11,14,17,2a
addons: addons:
apt: apt:
packages: packages:
@@ -198,6 +239,28 @@ matrix:
- ubuntu-toolchain-r-test - ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0 - llvm-toolchain-trusty-6.0
- os: linux
compiler: clang++-7
env: TOOLSET=clang COMPILER=clang++-7 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
- clang-7
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-7
- os: linux
compiler: clang++-8
env: TOOLSET=clang COMPILER=clang++-8 CXXSTD=03,11,14,17,2a
addons:
apt:
packages:
- clang-8
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-8
- os: linux - os: linux
compiler: clang++-libc++ compiler: clang++-libc++
env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z env: TOOLSET=clang COMPILER=clang++-libc++ CXXSTD=03,11,14,1z

34
CMakeLists.txt Normal file
View File

@@ -0,0 +1,34 @@
# Generated by `boostdep --cmake multi_array`
# Copyright 2020 Peter Dimov
# Distributed under the Boost Software License, Version 1.0.
# https://www.boost.org/LICENSE_1_0.txt
cmake_minimum_required(VERSION 3.5...3.16)
project(boost_multi_array VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX)
add_library(boost_multi_array INTERFACE)
add_library(Boost::multi_array ALIAS boost_multi_array)
target_include_directories(boost_multi_array INTERFACE include)
target_link_libraries(boost_multi_array
INTERFACE
Boost::array
Boost::assert
Boost::concept_check
Boost::config
Boost::core
Boost::functional
Boost::iterator
Boost::mpl
Boost::static_assert
Boost::type_traits
)
if(BUILD_TESTING AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
add_subdirectory(test)
endif()

30
build.jam Normal file
View File

@@ -0,0 +1,30 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# 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)
require-b2 5.2 ;
constant boost_dependencies :
/boost/array//boost_array
/boost/assert//boost_assert
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/core//boost_core
/boost/functional//boost_functional
/boost/iterator//boost_iterator
/boost/mpl//boost_mpl
/boost/static_assert//boost_static_assert
/boost/type_traits//boost_type_traits ;
project /boost/multi_array
;
explicit
[ alias boost_multi_array : : :
: <include>include <library>$(boost_dependencies) ]
[ alias all : boost_multi_array test ]
;
call-if : boost-library multi_array
;

View File

@@ -13,8 +13,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_HPP
#define BOOST_MULTI_ARRAY_RG071801_HPP #define BOOST_MULTI_ARRAY_HPP
// //
// multi_array.hpp - contains the multi_array class template // multi_array.hpp - contains the multi_array class template
@@ -569,4 +569,4 @@ private:
# pragma GCC diagnostic pop # pragma GCC diagnostic pop
#endif #endif
#endif // BOOST_MULTI_ARRAY_RG071801_HPP #endif

View File

@@ -1,5 +1,5 @@
#ifndef BOOST_ALGORITHM_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_ALGORITHM_HPP
#define BOOST_ALGORITHM_RG071801_HPP #define BOOST_MULTI_ARRAY_ALGORITHM_HPP
// //
// //
@@ -100,4 +100,4 @@ copy_n(InputIter first, Size count, OutputIter result) {
} // namespace detail } // namespace detail
} // namespace boost } // namespace boost
#endif // BOOST_ALGORITHM_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BASE_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_BASE_HPP
#define BASE_RG071801_HPP #define BOOST_MULTI_ARRAY_BASE_HPP
// //
// base.hpp - some implementation base classes for from which // base.hpp - some implementation base classes for from which
@@ -498,4 +498,4 @@ protected:
} // namespace boost } // namespace boost
#endif // BASE_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef COLLECTION_CONCEPT_RG103101_HPP #ifndef BOOST_MULTI_ARRAY_COLLECTION_CONCEPT_HPP
#define COLLECTION_CONCEPT_RG103101_HPP #define BOOST_MULTI_ARRAY_COLLECTION_CONCEPT_HPP
#include "boost/concept_check.hpp" #include "boost/concept_check.hpp"
@@ -23,4 +23,4 @@ namespace multi_array { // Old location for this
} }
} }
#endif // COLLECTION_CONCEPT_RG103101_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP #ifndef BOOST_MULTI_ARRAY_CONCEPT_CHECKS_HPP
#define BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP #define BOOST_MULTI_ARRAY_CONCEPT_CHECKS_HPP
// //
// concept-checks.hpp - Checks out Const MultiArray and MultiArray // concept-checks.hpp - Checks out Const MultiArray and MultiArray
@@ -218,4 +218,4 @@ namespace detail {
} // namespace boost } // namespace boost
#endif // BOOST_MULTI_ARRAY_CONCEPT_CHECKS_RG110101_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef COPY_ARRAY_RG092101_HPP #ifndef BOOST_MULTI_ARRAY_COPY_ARRAY_HPP
#define COPY_ARRAY_RG092101_HPP #define BOOST_MULTI_ARRAY_COPY_ARRAY_HPP
// //
// copy_array.hpp - generic code for copying the contents of one // copy_array.hpp - generic code for copying the contents of one
@@ -65,4 +65,4 @@ void copy_array (Array1& source, Array2& dest) {
} // namespace detail } // namespace detail
} // namespace boost } // namespace boost
#endif // COPY_ARRAY_RG092101_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_EXTENT_GEN_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_EXTENT_GEN_HPP
#define BOOST_EXTENT_GEN_RG071801_HPP #define BOOST_MULTI_ARRAY_EXTENT_GEN_HPP
#include "boost/multi_array/extent_range.hpp" #include "boost/multi_array/extent_range.hpp"
#include "boost/multi_array/range_list.hpp" #include "boost/multi_array/range_list.hpp"
@@ -72,4 +72,4 @@ public:
} // namespace boost } // namespace boost
#endif // BOOST_EXTENT_GEN_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_EXTENT_RANGE_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
#define BOOST_EXTENT_RANGE_RG071801_HPP #define BOOST_MULTI_ARRAY_EXTENT_RANGE_HPP
#include <utility> #include <utility>
@@ -46,4 +46,4 @@ public:
} // namespace boost } // namespace boost
#endif // BOOST_EXTENT_RANGE_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_INDEX_GEN_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_INDEX_GEN_HPP
#define BOOST_INDEX_GEN_RG071801_HPP #define BOOST_MULTI_ARRAY_INDEX_GEN_HPP
#include "boost/array.hpp" #include "boost/array.hpp"
#include "boost/multi_array/index_range.hpp" #include "boost/multi_array/index_range.hpp"
@@ -78,4 +78,4 @@ public:
} // namespace boost } // namespace boost
#endif // BOOST_INDEX_GEN_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_INDEX_RANGE_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_INDEX_RANGE_HPP
#define BOOST_INDEX_RANGE_RG071801_HPP #define BOOST_MULTI_ARRAY_INDEX_RANGE_HPP
#include <boost/config.hpp> #include <boost/config.hpp>
#include <utility> #include <utility>
@@ -191,4 +191,4 @@ namespace multi_array {
} // namespace detail } // namespace detail
} // namespace boost } // namespace boost
#endif // BOOST_INDEX_RANGE_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef ITERATOR_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_ITERATOR_HPP
#define ITERATOR_RG071801_HPP #define BOOST_MULTI_ARRAY_ITERATOR_HPP
// //
// iterator.hpp - implementation of iterators for the // iterator.hpp - implementation of iterators for the
@@ -162,4 +162,4 @@ public:
} // namespace detail } // namespace detail
} // namespace boost } // namespace boost
#endif // ITERATOR_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_REF_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_MULTI_ARRAY_REF_HPP
#define BOOST_MULTI_ARRAY_REF_RG071801_HPP #define BOOST_MULTI_ARRAY_MULTI_ARRAY_REF_HPP
// //
// multi_array_ref.hpp - code for creating "views" of array data. // multi_array_ref.hpp - code for creating "views" of array data.
@@ -619,4 +619,4 @@ protected:
} // namespace boost } // namespace boost
#endif // BOOST_MULTI_ARRAY_REF_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef RANGE_LIST_RG072501_HPP #ifndef BOOST_MULTI_ARRAY_RANGE_LIST_HPP
#define RANGE_LIST_RG072501_HPP #define BOOST_MULTI_ARRAY_RANGE_LIST_HPP
// //
// range_list.hpp - helper to build boost::arrays for *_set types // range_list.hpp - helper to build boost::arrays for *_set types
// //
@@ -67,4 +67,4 @@ public:
} // namespace detail } // namespace detail
} // namespace boost } // namespace boost
#endif // RANGE_LIST_RG072501_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_STORAGE_ORDER_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_STORAGE_ORDER_HPP
#define BOOST_STORAGE_ORDER_RG071801_HPP #define BOOST_MULTI_ARRAY_STORAGE_ORDER_HPP
#include "boost/multi_array/types.hpp" #include "boost/multi_array/types.hpp"
#include "boost/array.hpp" #include "boost/array.hpp"
@@ -122,4 +122,4 @@ namespace boost {
} // namespace boost } // namespace boost
#endif // BOOST_ARRAY_STORAGE_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef SUBARRAY_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_SUBARRAY_HPP
#define SUBARRAY_RG071801_HPP #define BOOST_MULTI_ARRAY_SUBARRAY_HPP
// //
// subarray.hpp - used to implement standard operator[] on // subarray.hpp - used to implement standard operator[] on
@@ -384,4 +384,4 @@ public:
}; };
} // namespace boost } // namespace boost
#endif // SUBARRAY_RG071801_HPP #endif

View File

@@ -11,8 +11,8 @@
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_TYPES_RG071801_HPP #ifndef BOOST_MULTI_ARRAY_TYPES_HPP
#define BOOST_MULTI_ARRAY_TYPES_RG071801_HPP #define BOOST_MULTI_ARRAY_TYPES_HPP
// //
// types.hpp - supply types that are needed by several headers // types.hpp - supply types that are needed by several headers
@@ -35,4 +35,4 @@ typedef std::ptrdiff_t index;
#endif // BOOST_MULTI_ARRAY_TYPES_RG071801_HPP #endif

View File

@@ -10,8 +10,8 @@
// Andrew Lumsdaine // Andrew Lumsdaine
// See http://www.boost.org/libs/multi_array for documentation. // See http://www.boost.org/libs/multi_array for documentation.
#ifndef BOOST_MULTI_ARRAY_VIEW_RG071301_HPP #ifndef BOOST_MULTI_ARRAY_VIEW_HPP
#define BOOST_MULTI_ARRAY_VIEW_RG071301_HPP #define BOOST_MULTI_ARRAY_VIEW_HPP
// //
// view.hpp - code for creating "views" of array data. // view.hpp - code for creating "views" of array data.
@@ -457,5 +457,4 @@ public:
} // namespace boost } // namespace boost
#endif // BOOST_MULTI_ARRAY_VIEW_RG071301_HPP #endif

View File

@@ -11,5 +11,6 @@
], ],
"maintainers": [ "maintainers": [
"Ronald Garcia <garcia -at- osl.iu.edu>" "Ronald Garcia <garcia -at- osl.iu.edu>"
] ],
"cxxstd": "03"
} }

View File

@@ -6,6 +6,8 @@
import testing ; import testing ;
project : requirements <library>/boost/multi_array//boost_multi_array ;
compile-fail fail_cbracket.cpp ; compile-fail fail_cbracket.cpp ;
compile-fail fail_cdata.cpp ; compile-fail fail_cdata.cpp ;
compile-fail fail_citerator.cpp ; compile-fail fail_citerator.cpp ;
@@ -15,7 +17,7 @@ compile-fail fail_csubarray.cpp ;
compile-fail fail_csubarray2.cpp ; compile-fail fail_csubarray2.cpp ;
compile-fail fail_csubarray3.cpp ; compile-fail fail_csubarray3.cpp ;
compile-fail fail_cview.cpp ; compile-fail fail_cview.cpp ;
compile-fail fail_cview2.cpp ; compile-fail fail_cview2.cpp : <library>/boost/test//included ;
compile-fail fail_cview3.cpp ; compile-fail fail_cview3.cpp ;
compile-fail fail_ref_cbracket.cpp ; compile-fail fail_ref_cbracket.cpp ;
compile-fail fail_ref_cdata.cpp ; compile-fail fail_ref_cdata.cpp ;
@@ -28,7 +30,7 @@ compile-fail fail_ref_csubarray3.cpp ;
compile-fail fail_ref_cview.cpp ; compile-fail fail_ref_cview.cpp ;
compile-fail fail_ref_cview2.cpp ; compile-fail fail_ref_cview2.cpp ;
compile-fail fail_ref_cview3.cpp ; compile-fail fail_ref_cview3.cpp ;
run constructors.cpp ; run constructors.cpp ;
run access.cpp ; run access.cpp ;
run compare.cpp ; run compare.cpp ;

View File

@@ -1,5 +1,5 @@
#ifndef GENERATIVE_TESTS_RG072001_HPP #ifndef BOOST_MULTI_ARRAY_GENERATIVE_TESTS_HPP
#define GENERATIVE_TESTS_RG072001_HPP #define BOOST_MULTI_ARRAY_GENERATIVE_TESTS_HPP
// Copyright 2002 The Trustees of Indiana University. // Copyright 2002 The Trustees of Indiana University.
@@ -279,4 +279,4 @@ int run_generative_tests() {
return boost::report_errors(); return boost::report_errors();
} }
#endif // GENERATIVE_TESTS_RG072001_HPP #endif