Skip to content

Commit

Permalink
cmake: set no -Wextra on msvc
Browse files Browse the repository at this point in the history
  • Loading branch information
SGSSGene committed May 17, 2023
1 parent 096ea57 commit a87847b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,18 @@ if (NOT TARGET mason_interface)
add_library ("mason_interface" INTERFACE)
target_link_libraries ("mason_interface" INTERFACE seqan2::seqan2)
target_include_directories ("mason_interface" INTERFACE "${CMAKE_CURRENT_LIST_DIR}/include")
target_compile_options ("mason_interface" INTERFACE "-pedantic" "-Wall" "-Wextra" "-flto=auto")
target_link_options ("mason_interface" INTERFACE "-flto=auto")
target_compile_options ("mason_interface" INTERFACE "-Wpedantic" "-Wall")
target_link_options ("mason_interface" INTERFACE)
# This warning is suppressed in SeqAn2, but #pragma GCC diagnostic takes no effect with LTO (bug)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options ("mason_interface" INTERFACE "-Wextra" "-flto=auto")
target_link_options ("mason_interface" INTERFACE "-Wno-alloc-size-larger-than" "-flto=auto")
endif ()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_compile_options ("mason_interface" INTERFACE "-Wextra")
target_link_options ("mason_interface" INTERFACE "-Wno-alloc-size-larger-than")
endif ()

target_compile_definitions ("mason_interface" INTERFACE SEQAN_APP_VERSION="${CMAKE_PROJECT_VERSION}")
endif ()

Expand Down

0 comments on commit a87847b

Please sign in to comment.