Skip to content
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
3 changes: 1 addition & 2 deletions .github/workflows/ci_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ jobs:
- name: Configure tests
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Coverage \
-DCMAKE_CXX_FLAGS="-Werror -Wno-interference-size"
cmake .. -DCMAKE_BUILD_TYPE=Coverage
make gtest_main

- name: Build tests
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/ci_header.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,6 @@ jobs:
fail-fast: false
matrix:
compiler: ["clang-latest", "gcc-latest", "gcc-third-latest", "intel"]
include:
- cxx_flags: "-Wno-interference-size"
- compiler: "clang-latest"
cxx_flags: ""
- compiler: "intel"
cxx_flags: ""
container:
image: ghcr.io/seqan/${{ matrix.compiler }}
volumes:
Expand All @@ -51,7 +45,6 @@ jobs:
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Werror ${{ matrix.cxx_flags }}" \
-DCHOPPER_HEADER_TEST_ONLY=ON

- name: Build tests
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@ jobs:
fail-fast: false
matrix:
compiler: ["clang-latest", "clang-second-latest", "clang-third-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest", "intel"]
include:
- cxx_flags: "-Wno-interference-size"
- compiler: "clang-latest"
cxx_flags: ""
- compiler: "clang-second-latest"
cxx_flags: ""
- compiler: "clang-third-latest"
cxx_flags: ""
- compiler: "intel"
cxx_flags: ""
container:
image: ghcr.io/seqan/${{ matrix.compiler }}
volumes:
Expand All @@ -54,8 +44,7 @@ jobs:
- name: Configure tests
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Werror ${{ matrix.cxx_flags }}"
cmake .. -DCMAKE_BUILD_TYPE=Release
make gtest_main

- name: Build tests
Expand Down
11 changes: 1 addition & 10 deletions .github/workflows/ci_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@ jobs:
fail-fast: false
matrix:
compiler: ["clang-latest", "clang-second-latest", "clang-third-latest", "gcc-latest", "gcc-second-latest", "gcc-third-latest"]
include:
- cxx_flags: "-Wno-interference-size"
- compiler: "clang-latest"
cxx_flags: ""
- compiler: "clang-second-latest"
cxx_flags: ""
- compiler: "clang-third-latest"
cxx_flags: ""
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -52,8 +44,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_FLAGS="-Werror ${{ matrix.cxx_flags }}"
cmake .. -DCMAKE_BUILD_TYPE=Release
make gtest_main

- name: Build tests
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cron_sanitizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
include:
- name: "ASan"
os: ubuntu-latest
cxx_flags: "-fno-omit-frame-pointer -fsanitize=address -Wno-maybe-uninitialized -Wno-interference-size"
cxx_flags: "-fno-omit-frame-pointer -fsanitize=address -Wno-maybe-uninitialized"

- name: "ASan"
os: macos-latest
Expand All @@ -48,7 +48,7 @@ jobs:

- name: "UBSan"
os: ubuntu-latest
cxx_flags: "-fno-omit-frame-pointer -fsanitize=undefined,float-divide-by-zero -Wno-stringop-overflow -Wno-interference-size"
cxx_flags: "-fno-omit-frame-pointer -fsanitize=undefined,float-divide-by-zero -Wno-stringop-overflow"

- name: "UBSan"
os: macos-latest
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_CXX_FLAGS="-Werror ${{ matrix.cxx_flags }}"
-DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}"
make gtest_main

- name: Build tests
Expand Down
17 changes: 11 additions & 6 deletions cmake/package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
# CPM Package Lock
# This file should be committed to version control

# cmake-format: off

# hibf
set (CHOPPER_HIBF_VERSION 99edc05f9c88892c0019c6ef68affbac623f57d2)
set (CHOPPER_HIBF_VERSION 99edc05f9c88892c0019c6ef68affbac623f57d2 CACHE STRING "")
CPMDeclarePackage (hibf
NAME hibf
GIT_TAG ${CHOPPER_HIBF_VERSION} # main
Expand All @@ -16,7 +18,7 @@ CPMDeclarePackage (hibf
OPTIONS "INSTALL_HIBF OFF"
)
# sharg
set (CHOPPER_SHARG_VERSION f9c5c7baf1c60bd556a5726ae4a737ed1536fabf)
set (CHOPPER_SHARG_VERSION f9c5c7baf1c60bd556a5726ae4a737ed1536fabf CACHE STRING "")
CPMDeclarePackage (sharg
NAME sharg
GIT_TAG ${CHOPPER_SHARG_VERSION} # main
Expand All @@ -26,17 +28,18 @@ CPMDeclarePackage (sharg
OPTIONS "INSTALL_SHARG OFF" "INSTALL_TDL OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING" "BUILD_TESTING OFF"
)
# seqan3
set (CHOPPER_SEQAN3_VERSION 8724133817fc7889b280253c209aa47f6395a13c)
set (CHOPPER_SEQAN3_VERSION 3.4.0 CACHE STRING "")
CPMDeclarePackage (seqan3
NAME seqan3
GIT_TAG ${CHOPPER_SEQAN3_VERSION} # main
VERSION ${CHOPPER_SEQAN3_VERSION}
GIT_TAG ${CHOPPER_SEQAN3_VERSION}
GITHUB_REPOSITORY seqan/seqan3
SYSTEM TRUE
EXCLUDE_FROM_ALL TRUE
OPTIONS "INSTALL_SEQAN3 OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING"
)
# googletest
set (CHOPPER_GOOGLETEST_VERSION 1.17.0)
set (CHOPPER_GOOGLETEST_VERSION 1.17.0 CACHE STRING "")
CPMDeclarePackage (googletest
NAME GTest
VERSION ${CHOPPER_GOOGLETEST_VERSION}
Expand All @@ -47,7 +50,7 @@ CPMDeclarePackage (googletest
"CMAKE_CXX_STANDARD 20"
)
# use_ccache
set (USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37)
set (USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37 CACHE STRING "")
CPMDeclarePackage (use_ccache
NAME use_ccache
GIT_TAG ${USE_CCACHE_VERSION} # main
Expand All @@ -56,3 +59,5 @@ CPMDeclarePackage (use_ccache
SYSTEM TRUE
EXCLUDE_FROM_ALL TRUE
)

# cmake-format: on
18 changes: 18 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ target_include_directories (chopper_interface INTERFACE "${PROJECT_SOURCE_DIR}/i
target_compile_options (chopper_interface INTERFACE "-pedantic" "-Wall" "-Wextra")
add_library (chopper::interface ALIAS chopper_interface)

option (CHOPPER_WITH_WERROR "Report compiler warnings as errors." ON)
if (CHOPPER_WITH_WERROR)
target_compile_options (chopper_interface INTERFACE "-Werror")
message (STATUS "Building tests with -Werror.")
endif ()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# Disable warning about std::hardware_destructive_interference_size not being ABI-stable.
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12)
target_compile_options (chopper_interface INTERFACE "-Wno-interference-size")
endif ()

# Warn about failed return value optimization.
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 14)
target_compile_options (chopper_interface INTERFACE "-Wnrvo")
endif ()
endif ()

add_library (chopper_shared STATIC configuration.cpp input_functor.cpp)
target_link_libraries (chopper_shared PUBLIC chopper_interface)
add_library (chopper::shared ALIAS chopper_shared)
Expand Down