Skip to content

Commit af57cfd

Browse files
committed
Some warnings are supported by clang but not gcc
1 parent 70eadd6 commit af57cfd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11

22
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
3-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wno-unused-private-field -Wno-unknown-warning-option -Wno-maybe-uninitialized")
3+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -Wall -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-local-typedefs -Wno-maybe-uninitialized")
4+
5+
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
6+
# using regular Clang or AppleClang
7+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-private-field -Wno-unknown-warning-option")
8+
endif()
49

510
option(BUILD_WERROR "Build with -Werror" ON)
611

0 commit comments

Comments
 (0)