Skip to content
Open
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
17 changes: 15 additions & 2 deletions cmake/HighFiveWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang"

target_compile_options(HighFiveWarnings
INTERFACE
-Wall
-Wextra
-Wshadow
-Wnon-virtual-dtor
Expand All @@ -23,6 +22,21 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang"
-Wconversion
-Wsign-conversion
)

# Clang-Cl frontend for Microsoft Compiler does not digest -Wall because it
# enables some obscure warnings about missing c++98 compatibility. Better is
# to use Microsoft-style /W4 flag:
if(NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")
target_compile_options(HighFiveWarnings
INTERFACE
-Wall
)
else()
target_compile_options(HighFiveWarnings
INTERFACE
/W4
)
endif()
endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
Expand All @@ -46,4 +60,3 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
)
endif()
endif()

Loading