on xenial help sign in
Add the Wsuggest-override flag to gcc
db500d3Albert Astals Cid
CMakeLists.txt+6
@@ -40,6 +40,12 @@ if(cmake_build_type_lower MATCHES coverage)
40 ENABLE_COVERAGE_REPORT(TARGETS ${SHELL_APP} FILTER /usr/include ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*)
40 ENABLE_COVERAGE_REPORT(TARGETS ${SHELL_APP} FILTER /usr/include ${CMAKE_SOURCE_DIR}/tests/* ${CMAKE_BINARY_DIR}/*)
41endif()
41endif()
42
42
43+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
44+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0")
45+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" )
46+ endif()
47+endif()
48+
43# Make sure we have all the needed symbols
49# Make sure we have all the needed symbols
44set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
50set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
45set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,defs")
51set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,defs")
plugins/LightDM/FullLightDM/CMakeLists.txt+5−1
@@ -6,10 +6,14 @@ add_definitions(-DFULL_LIGHTDM)
6
6
7include_directories(
7include_directories(
8 ../
8 ../
9− ${LIBLIGHTDM_INCLUDE_DIRS}
10 ${CMAKE_CURRENT_BINARY_DIR}
9 ${CMAKE_CURRENT_BINARY_DIR}
11 )
10 )
12
11
12+include_directories(
13+ SYSTEM
14+ ${LIBLIGHTDM_INCLUDE_DIRS}
15+ )
16+
13foreach(source_file ${QMLPLUGIN_SRC})
17foreach(source_file ${QMLPLUGIN_SRC})
14 list(APPEND RELATIVE_QMLPLUGIN_SRC ../${source_file})
18 list(APPEND RELATIVE_QMLPLUGIN_SRC ../${source_file})
15endforeach()
19endforeach()
plugins/Unity/Indicators/CMakeLists.txt+3
@@ -11,6 +11,9 @@ include_directories(
11include_directories(
11include_directories(
12 SYSTEM
12 SYSTEM
13 ${GLIB_INCLUDE_DIRS}
13 ${GLIB_INCLUDE_DIRS}
14+)
15+include_directories(
16+ SYSTEM
14 ${GIO_INCLUDE_DIRS}
17 ${GIO_INCLUDE_DIRS}
15 ${QMENUMODEL_INCLUDE_DIRS}
18 ${QMENUMODEL_INCLUDE_DIRS}
16)
19)
tests/mocks/QtMultimedia/videooutput.h+1−1
@@ -31,7 +31,7 @@ public:
31 QObject *source() const { return m_source.data(); }
31 QObject *source() const { return m_source.data(); }
32 void setSource(QObject *source);
32 void setSource(QObject *source);
33
33
34− void itemChange(ItemChange change, const ItemChangeData & value);
34+ void itemChange(ItemChange change, const ItemChangeData & value) override;
35
35
36Q_SIGNALS:
36Q_SIGNALS:
37 void sourceChanged();
37 void sourceChanged();
tests/uqmlscene/CMakeLists.txt+5−1
@@ -9,10 +9,14 @@ pkg_check_modules(XCB REQUIRED xcb)
9include_directories(
9include_directories(
10 ${CMAKE_CURRENT_BINARY_DIR}
10 ${CMAKE_CURRENT_BINARY_DIR}
11 ${CMAKE_SOURCE_DIR}/src
11 ${CMAKE_SOURCE_DIR}/src
12− ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
13 ${CMAKE_SOURCE_DIR}/libs/UbuntuGestures
12 ${CMAKE_SOURCE_DIR}/libs/UbuntuGestures
14)
13)
15
14
15+include_directories(
16+ SYSTEM
17+ ${Qt5Gui_PRIVATE_INCLUDE_DIRS}
18+)
19+
16if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
20if (NOT "${XCB_INCLUDE_DIRS}" STREQUAL "")
17 set_target_properties(uqmlscene PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
21 set_target_properties(uqmlscene PROPERTIES INCLUDE_DIRECTORIES ${XCB_INCLUDE_DIRS})
18endif()
22endif()