Skip to content

Commit

Permalink
[INFRA] Remove range-v3 dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
eseiler committed May 31, 2022
1 parent 909ad88 commit 1681ce4
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 66 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ Please see the [online documentation](https://docs.seqan.de/seqan/3-master-user/
|**compiler** | [GCC](https://gcc.gnu.org) | ≥ 10 | no other compiler is currently supported! |
|**build system** | [CMake](https://cmake.org) | ≥ 3.4 | optional, but recommended |
|**required libs** | [SDSL](https://github.com/xxsds/sdsl-lite) | ≥ 3 | |
| | [Range-V3](https://github.com/ericniebler/range-v3) | ≥ 0.11.0 | |
|**optional libs** | [cereal](https://github.com/USCiLab/cereal) | ≥ 1.2.3 | required for serialisation and CTD support |
| | [zlib](https://github.com/madler/zlib) | ≥ 1.2 | required for `*.gz` and `.bam` file support |
| | [bzip2](https://www.sourceware.org/bzip2) | ≥ 1.0 | required for `*.bz2` file support |
Expand All @@ -93,7 +92,6 @@ Quick-Setup without CMake:
g++-11 -O3 -DNDEBUG -Wall -Wextra \
-std=c++20 \
-I /path/to/seqan3/include \
-isystem /path/to/seqan3/submodules/range-v3/include \
-isystem /path/to/seqan3/submodules/sdsl-lite/include \
-isystem /path/to/seqan3/submodules/cereal/include \
-DSEQAN3_HAS_ZLIB=1 -DSEQAN3_HAS_BZIP2=1 \
Expand Down
12 changes: 1 addition & 11 deletions build_system/seqan3-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
# SeqAn requires the following libraries:
#
# SDSL -- the succinct data structure library
# Range-V3 -- Ranges Library by Eric Niebler
#
# SeqAn has the following optional dependencies:
#
Expand Down Expand Up @@ -309,18 +308,9 @@ else ()
endif ()

# ----------------------------------------------------------------------------
# Require Ranges and SDSL
# Require SDSL
# ----------------------------------------------------------------------------

check_include_file_cxx (range/v3/version.hpp _SEQAN3_HAVE_RANGEV3)

if (_SEQAN3_HAVE_RANGEV3)
seqan3_config_print ("Required dependency: Range-V3 found.")
else ()
seqan3_config_error (
"The range-v3 library is required, but wasn't found. Get it from https://github.com/ericniebler/range-v3/")
endif ()

check_include_file_cxx (sdsl/version.hpp _SEQAN3_HAVE_SDSL)

if (_SEQAN3_HAVE_SDSL)
Expand Down
5 changes: 0 additions & 5 deletions include/seqan3/alphabet/container/bitpacked_sequence.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ class bitpacked_sequence
using size_type = std::ranges::range_size_t<data_type>;
//!\}

//!\cond
// this signals to range-v3 that something is a container :|
using allocator_type = void;
//!\endcond

/*!\name Constructors, destructor and assignment
* \{
*/
Expand Down
5 changes: 0 additions & 5 deletions include/seqan3/alphabet/container/concatenated_sequences.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ class concatenated_sequences
using size_type = std::ranges::range_size_t<data_delimiters_type>;
//!\}

//!\cond
// this signals to range-v3 that something is a container :|
using allocator_type = void;
//!\endcond

protected:
/*!\name Compatibility
* \brief Static constexpr variables that emulate whether the ranges are compatible
Expand Down
21 changes: 0 additions & 21 deletions include/seqan3/core/platform.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,27 +68,6 @@
# error SeqAn3 include directory not set correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
#endif

// Ranges [required]
#if __has_include(<range/v3/version.hpp>)
# define RANGE_V3_MINVERSION 1100
# define RANGE_V3_MAXVERSION 1199
// TODO the following doesn't actually show the current version, only its formula. How'd you do it?
# define SEQAN3_MSG \
"Your version: " SEQAN3_STR(RANGE_V3_VERSION) "; minimum version: " SEQAN3_STR( \
RANGE_V3_MINVERSION) "; expected maximum version: " SEQAN3_STR(RANGE_V3_MAXVERSION)
# include <range/v3/version.hpp>
# if RANGE_V3_VERSION < RANGE_V3_MINVERSION
# error Your range-v3 library is too old.
# pragma message(SEQAN3_MSG)
# elif RANGE_V3_VERSION > RANGE_V3_MAXVERSION
# pragma GCC warning "Your range-v3 library is possibly too new. Some features might not work correctly."
# pragma message(SEQAN3_MSG)
# endif
# undef SEQAN3_MSG
#else
# error The range-v3 library was not included correctly. Forgot to add -I ${INSTALLDIR}/include to your CXXFLAGS?
#endif

// SDSL [required]
#if __has_include(<sdsl/version.hpp>)
# include <sdsl/version.hpp>
Expand Down
5 changes: 0 additions & 5 deletions include/seqan3/utility/container/dynamic_bitset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,6 @@ class dynamic_bitset
using size_type = detail::min_viable_uint_t<bit_capacity>;
//!\}

//!\cond
// this signals to range-v3 that something is a container :|
using allocator_type = void;
//!\endcond

/*!\name Constructors, destructor and assignment
* \{
*/
Expand Down
5 changes: 0 additions & 5 deletions include/seqan3/utility/container/small_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,6 @@ class small_vector

//!\}

//!\cond
// this signals to range-v3 that something is a container :|
using allocator_type = void;
//!\endcond

/*!\name Constructors, destructor and assignment
* \{
*/
Expand Down
1 change: 0 additions & 1 deletion include/seqan3/utility/range/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
* \link std::ranges::output_range output ranges \endlink (if they are output files), but they are neither
* containers, decorators nor views.
*
* \sa https://ericniebler.github.io/range-v3/index.html
* \see utility
*/

Expand Down
1 change: 0 additions & 1 deletion include/seqan3/utility/views/all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
* elements in the original range (if all views in the pipe preserve std::ranges::output_range), but through others
* you can't.
*
* \sa https://ericniebler.github.io/range-v3/index.html#range-views
* \sa https://en.cppreference.com/w/cpp/ranges
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function (generate_include_dependencies_impl)
# utility/views/CMakeFiles/zip_test.dir/zip_test.cpp.o: \
# /seqan3/include/seqan3/core/platform.hpp \
# /seqan3/include/seqan3/std/algorithm \
# /seqan3/submodules/range-v3/include/concepts/compare.hpp
# ```

# read in file and filter out linebreaks
Expand Down
2 changes: 0 additions & 2 deletions test/cmake/seqan3_macro_benchmark.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ cmake_minimum_required (VERSION 3.10)
# foo bar # user-specified data
# seqan3_version 3.0.1 # automatically set
# seqan3_git_version a1829272d7bafea48580af6eaac2bfbb678c3861 # automatically set
# range-v3_version 0.10.0 # automatically set
# range-v3_git_version 5daa38e80238a1b50a18c08b4a582178f414404c # automatically set
# sdsl_version 3.0.0 # automatically set
# sdsl_git_version 9a0d5676fd09fb8b52af214eca2d5809c9a32dbe # automatically set
# )
Expand Down
4 changes: 0 additions & 4 deletions test/header/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ seqan3_header_test (seqan3_test "${SEQAN3_CLONE_DIR}/test/include" "")

if (SEQAN3_FULL_HEADER_TEST)

# contains deprecated headers that produce an error when included
seqan3_header_test (range-v3 "${SEQAN3_CLONE_DIR}/submodules/range-v3/include" "/detail/")
target_compile_definitions (range-v3_header_test INTERFACE RANGES_DISABLE_DEPRECATED_WARNINGS=1)

# not self-contained headers; error: extra ‘;’ [-Werror=pedantic]
# seqan3_header_test (lemon "${SEQAN3_CLONE_DIR}/submodules/lemon/include" "")

Expand Down
2 changes: 0 additions & 2 deletions test/macro_benchmark/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ seqan3_macro_benchmark (
bar # user-specified data
# seqan3_version 3.0.1 # automatically set
# seqan3_git_version a1829272d7bafea48580af6eaac2bfbb678c3861 # automatically set
# range-v3_version 0.10.0 # automatically set
# range-v3_git_version 5daa38e80238a1b50a18c08b4a582178f414404c # automatically set
# sdsl_version 3.0.0 # automatically set
# sdsl_git_version 9a0d5676fd09fb8b52af214eca2d5809c9a32dbe # automatically set
)
2 changes: 1 addition & 1 deletion test/unit/utility/views/zip_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ TEST_F(zip_test, use_as_output_range)
EXPECT_EQ(zip_view.size(), 4u);
}

// // https://github.com/ericniebler/range-v3/issues/1480
// https://github.com/ericniebler/range-v3/issues/1480
TEST_F(zip_test, gcc10bug_rangev3_1480)
{
// This regression test only checks if the respective code compiles.
Expand Down

0 comments on commit 1681ce4

Please sign in to comment.