Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] libc++: header tests #3210

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci_misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ jobs:
build_type: Release
test_threads: 2

- name: "Header clang17 libc++"
compiler: "clang-17"
build: header
build_type: Release
test_threads: 2
cxx_flags: "-stdlib=libc++"

- name: "Header gcc13"
compiler: "gcc-13"
build: header
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/core/debug_stream/debug_stream_type.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class debug_stream_type
//!\}

//!\brief This type is std::ios_base::fmtflags
using fmtflags = decltype(std::declval<std::basic_ostream<char_t>>().flags());
using fmtflags = typename std::basic_ostream<char_t>::fmtflags;

/*!\name Format flags (std::ios_base::fmtflags)
* \brief std::ios_base::fmtflags that modify the stream's behaviour.
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/utility/simd/detail/builtin_simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ constexpr bool is_builtin_simd_v = is_builtin_simd<builtin_simd_t>::value;
* seqan3::detail::builtin_simd types.
*/
template <>
constexpr auto default_simd_max_length<builtin_simd> = []()
inline constexpr auto default_simd_max_length<builtin_simd> = []()
{
#if defined(__AVX512F__)
return min_viable_uint_v<64u>;
Expand Down
7 changes: 5 additions & 2 deletions test/header/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ macro (seqan3_header_test component header_base_path exclude_regex)

file (WRITE "${PROJECT_BINARY_DIR}/${target}.cpp" "")
add_executable (${target} ${PROJECT_BINARY_DIR}/${target}.cpp)
target_link_libraries (${target} seqan3::test::header)
target_link_libraries (${target} seqan3::test seqan3::test::header)
add_test (NAME "header/${target}" COMMAND ${target})

foreach (header ${header_files})
Expand Down Expand Up @@ -112,7 +112,10 @@ macro (seqan3_header_test component header_base_path exclude_regex)
"${CMAKE_CURRENT_SOURCE_DIR}/generate_header_source.cmake")

add_library (${header_target} OBJECT "${header_target_source}")
target_link_libraries (${header_target} seqan3::test::header)
# Link seqan3::test first, even though it is also linked by seqan3::test:header.
# Without this, the compile options of seqan3::test are appended, e.g.,
# `-Wno-error=... -Werror -Wall`, instead of `-Werror -Wall -Wno-error=...`
target_link_libraries (${header_target} seqan3::test seqan3::test::header)
target_sources (${target} PRIVATE $<TARGET_OBJECTS:${header_target}>)
endforeach ()
endforeach ()
Expand Down
1 change: 1 addition & 0 deletions test/include/seqan3/test/pretty_printing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include <ios>
#include <iterator>
#include <ostream>

#include <seqan3/core/debug_stream/debug_stream_type.hpp>

Expand Down
2 changes: 2 additions & 0 deletions test/seqan3-test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ if (NOT TARGET seqan3::test::header)
add_library (seqan3_test_header INTERFACE)
target_link_libraries (seqan3_test_header INTERFACE "seqan3::test::unit")
target_link_libraries (seqan3_test_header INTERFACE "seqan3::test::performance")
target_compile_options (seqan3_test_header INTERFACE "-Wno-unused-const-variable" "-Wno-unused-variable"
"-Wno-unused-function")
target_compile_definitions (seqan3_test_header INTERFACE -DSEQAN3_DISABLE_DEPRECATED_WARNINGS)
target_compile_definitions (seqan3_test_header INTERFACE -DSEQAN3_HEADER_TEST)
add_library (seqan3::test::header ALIAS seqan3_test_header)
Expand Down