Commit 6cbb0633 authored by Ghislain MARY's avatar Ghislain MARY

Fix build with GCC that does not support the -Wsuggest-override option.

parent 1b3fce8d
......@@ -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")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment