Changeset View
Changeset View
Standalone View
Standalone View
kde-modules/KDEFrameworkCompilerSettings.cmake
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | |||||
60 | if (NOT WIN32) | 60 | if (NOT WIN32) | ||
61 | # Strict iterators can't be used on Windows, they lead to a link error | 61 | # Strict iterators can't be used on Windows, they lead to a link error | ||
62 | # when application code iterates over a QVector<QPoint> for instance, unless | 62 | # when application code iterates over a QVector<QPoint> for instance, unless | ||
63 | # Qt itself was also built with strict iterators. | 63 | # Qt itself was also built with strict iterators. | ||
64 | # See example at https://bugreports.qt.io/browse/AUTOSUITE-946 | 64 | # See example at https://bugreports.qt.io/browse/AUTOSUITE-946 | ||
65 | add_definitions(-DQT_STRICT_ITERATORS) | 65 | add_definitions(-DQT_STRICT_ITERATORS) | ||
66 | endif() | 66 | endif() | ||
67 | 67 | | |||
68 | add_definitions( | ||||
69 | -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 | ||||
70 | -DKF_DEPRECATED_WARNINGS_SINCE=0x060000 | ||||
71 | ) | ||||
72 | | ||||
68 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | 73 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
69 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") | 74 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") | ||
70 | endif() | 75 | endif() | ||
71 | 76 | | |||
72 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | 77 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
73 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | 78 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | ||
74 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant" ) | 79 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant" ) | ||
75 | endif() | 80 | endif() | ||
76 | endif() | 81 | endif() | ||
77 | 82 | | |||
78 | if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | 83 | if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
79 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | 84 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | ||
80 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant" ) | 85 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant" ) | ||
81 | endif() | 86 | endif() | ||
82 | endif() | 87 | endif() |