Skip to content

Commit

Permalink
Merge pull request #3210 from eseiler/infra/header
Browse files Browse the repository at this point in the history
[FIX] libc++: header tests
  • Loading branch information
eseiler authored Nov 15, 2023
2 parents fc8f4f7 + b447e2f commit 9f0ffc8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
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

1 comment on commit 9f0ffc8

@vercel
Copy link

@vercel vercel bot commented on 9f0ffc8 Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

seqan3 – ./

seqan3-git-master-seqan.vercel.app
seqan3-seqan.vercel.app
seqan3.vercel.app

Please sign in to comment.