Skip to content

Commit b3319d4

Browse files
committed
Compiler fixes
1 parent 0504ddd commit b3319d4

File tree

7 files changed

+25
-12
lines changed

7 files changed

+25
-12
lines changed

.clang-format

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,4 +246,6 @@ TabWidth: 4
246246
UseTab: Never
247247
VerilogBreakBetweenInstancePorts: true
248248
WhitespaceSensitiveMacros:
249+
- SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY_START
250+
- SEQAN3_WORKAROUND_GCC_BOGUS_MEMCPY_STOP
249251
...

.github/workflows/ci_linux.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
compiler: ["clang-latest", "clang-second-latest", "clang-third-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest", "intel"]
32+
compiler: ["clang-latest", "clang-second-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest", "intel"]
3333
include:
3434
- compiler: "intel"
3535
cxx_flags: "-fp-model=strict -Wno-overriding-option"
36+
- compiler: "gcc-latest"
37+
cxx_flags: "-Wno-stringop-overflow"
38+
- compiler: "gcc-second-latest"
39+
cxx_flags: "-Wno-stringop-overflow"
3640
container:
3741
image: ghcr.io/seqan/${{ matrix.compiler }}
3842
steps:

.github/workflows/ci_macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
compiler: ["clang-latest", "clang-second-latest", "clang-third-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest"]
32+
compiler: ["clang-latest", "clang-second-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest"]
3333
steps:
3434
- name: Checkout
3535
uses: actions/checkout@v4

include/fpgalign/argument_parsing.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ enum class subcommand : uint8_t
1717

1818
struct parse_result
1919
{
20-
subcommand subcommand;
21-
config config;
20+
subcommand subcmd;
21+
config cfg;
2222
};
2323

2424
parse_result parse_arguments(std::vector<std::string> command_line);

src/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
4242
endif ()
4343
endif ()
4444

45+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
46+
# std::jthread is experimental in LLVM < 20
47+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20)
48+
target_compile_definitions (FPGAlign_lib PUBLIC "_LIBCPP_ENABLE_EXPERIMENTAL")
49+
endif ()
50+
endif ()
51+
4552
# Add the application.
4653
add_executable (FPGAlign fpgalign.cpp)
4754
target_link_libraries (FPGAlign PRIVATE FPGAlign_lib)

src/argument_parsing.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,13 @@ parse_result parse_arguments(std::vector<std::string> command_line)
140140

141141
if (sub_parser.info.app_name == std::string_view{"FPGAlign-build"})
142142
{
143-
result.subcommand = subcommand::build;
144-
result.config = build::parse_arguments(sub_parser);
143+
result.subcmd = subcommand::build;
144+
result.cfg = build::parse_arguments(sub_parser);
145145
}
146146
if (sub_parser.info.app_name == std::string_view{"FPGAlign-search"})
147147
{
148-
result.subcommand = subcommand::search;
149-
result.config = search::parse_arguments(sub_parser);
148+
result.subcmd = subcommand::search;
149+
result.cfg = search::parse_arguments(sub_parser);
150150
}
151151

152152
return result;

src/fpgalign.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ int main(int argc, char ** argv)
1616
{
1717
parse_result const result = parse_arguments({argv, argv + argc});
1818

19-
if (result.subcommand == subcommand::build)
20-
build::build(result.config);
21-
if (result.subcommand == subcommand::search)
22-
search::search(result.config);
19+
if (result.subcmd == subcommand::build)
20+
build::build(result.cfg);
21+
if (result.subcmd == subcommand::search)
22+
search::search(result.cfg);
2323
}
2424
catch (std::exception const & ext)
2525
{

0 commit comments

Comments
 (0)