mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-22 22:28:08 +00:00
Fix build with GCC that does not support the -Wsuggest-override option.
This commit is contained in:
parent
1b3fce8df3
commit
6cbb0633be
1 changed files with 6 additions and 2 deletions
|
|
@ -28,13 +28,15 @@ set(TARGET_NAME linphone-qt)
|
|||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
# Use automatically moc from Qt5.
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
if(NOT WIN32)
|
||||
set(CUSTOM_FLAGS "\
|
||||
check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE)
|
||||
set(CUSTOM_FLAGS "\
|
||||
-Wall \
|
||||
-Wcast-align \
|
||||
-Wconversion \
|
||||
|
|
@ -47,10 +49,12 @@ set(CUSTOM_FLAGS "\
|
|||
-Wold-style-cast \
|
||||
-Woverloaded-virtual \
|
||||
-Wpointer-arith \
|
||||
-Wsuggest-override \
|
||||
-Wuninitialized \
|
||||
-Wunused \
|
||||
")
|
||||
if(SUGGEST_OVERRIDE)
|
||||
set(CUSTOM_FLAGS "${CUSTOM_FLAGS} -Wsuggest-override")
|
||||
endif()
|
||||
endif()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CUSTOM_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DQT_QML_DEBUG -DQT_DECLARATIVE_DEBUG")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue