Skip to content

Commit

Permalink
Remove noisy -Winline warning from test suite warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Morwenn committed Aug 6, 2023
1 parent e19248d commit 3dd054a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cmake/cpp-sort-utils.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019-2022 Morwenn
# Copyright (c) 2019-2023 Morwenn
# SPDX-License-Identifier: MIT

# Add a selection of warnings to a target
Expand All @@ -7,14 +7,11 @@ macro(cppsort_add_warnings target)
target_compile_options(${target} PRIVATE /W2)
else()
target_compile_options(${target} PRIVATE
-Wall -Wextra -Wcast-align -Winline -Wmissing-declarations -Wmissing-include-dirs
-Wall -Wextra -Wcast-align -Wmissing-declarations -Wmissing-include-dirs
-Wnon-virtual-dtor -Wodr -Wpedantic -Wredundant-decls -Wundef -Wunreachable-code
$<$<CXX_COMPILER_ID:GNU>:-Wlogical-op -Wuseless-cast -Wzero-as-null-pointer-constant>
# The warning when initializing an std::array is just too much of a bother
$<$<CXX_COMPILER_ID:Clang>:-Wno-missing-braces>
# Without this we get thousands of -Winline warnings without even explicitly
# asking to inline anything, which makes compilation results unreadable
$<$<CXX_COMPILER_ID:GNU>:-Wno-inline>
)
endif()
endmacro()

0 comments on commit 3dd054a

Please sign in to comment.