Changeset View
Changeset View
Standalone View
Standalone View
kde-modules/KDEFrameworkCompilerSettings.cmake
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Line(s) | |||||
62 | endif() | 62 | endif() | ||
63 | 63 | | |||
64 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | 64 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
65 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") | 65 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") | ||
66 | endif() | 66 | endif() | ||
67 | 67 | | |||
68 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | 68 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
69 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | 69 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | ||
70 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override" ) | 70 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsuggest-override -Wlogical-op -Wzero-as-null-pointer-constant" ) | ||
71 | endif() | ||||
72 | endif() | ||||
73 | | ||||
74 | if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") | ||||
75 | if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0.0") | ||||
76 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wzero-as-null-pointer-constant" ) | ||||
apol: Maybe you can add `-Wzero-as-null-pointer-constant` to the if above which is `gcc or clang`? | |||||
problem it's i also need the version check and since we already have it here it doesn't make the code any more simpler. aacid: problem it's i also need the version check and since we already have it here it doesn't make… | |||||
apol: Ugh true, sorry. | |||||
71 | endif() | 77 | endif() | ||
72 | endif() | 78 | endif() |
Maybe you can add -Wzero-as-null-pointer-constant to the if above which is gcc or clang?