Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show First 20 Lines • Show All 106 Lines • ▼ Show 20 Line(s) | 101 | function(add_compile_flag_if_supported _flag) | |||
---|---|---|---|---|---|
107 | if (${${_varname}}) | 107 | if (${${_varname}}) | ||
108 | add_compile_options(${_flag}) | 108 | add_compile_options(${_flag}) | ||
109 | endif() | 109 | endif() | ||
110 | endfunction() | 110 | endfunction() | ||
111 | 111 | | |||
112 | # Turn off missing-field-initializers warning for GCC to avoid noise from false positives with empty {} | 112 | # Turn off missing-field-initializers warning for GCC to avoid noise from false positives with empty {} | ||
113 | # See discussion: http://mail.kde.org/pipermail/kdevelop-devel/2014-February/046910.html | 113 | # See discussion: http://mail.kde.org/pipermail/kdevelop-devel/2014-February/046910.html | ||
114 | add_compile_flag_if_supported(-Wno-missing-field-initializers) | 114 | add_compile_flag_if_supported(-Wno-missing-field-initializers) | ||
115 | add_compile_flag_if_supported(-Werror=switch) | ||||
115 | add_compile_flag_if_supported(-Werror=undefined-bool-conversion) | 116 | add_compile_flag_if_supported(-Werror=undefined-bool-conversion) | ||
116 | add_compile_flag_if_supported(-Werror=tautological-undefined-compare) | 117 | add_compile_flag_if_supported(-Werror=tautological-undefined-compare) | ||
117 | if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | 118 | if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
118 | add_compile_flag_if_supported(-Wdocumentation) | 119 | add_compile_flag_if_supported(-Wdocumentation) | ||
120 | add_compile_flag_if_supported(-Wcovered-switch-default) | ||||
119 | # This warning is triggered by every call to qCDebug() | 121 | # This warning is triggered by every call to qCDebug() | ||
120 | add_compile_flag_if_supported(-Wno-gnu-zero-variadic-macro-arguments) | 122 | add_compile_flag_if_supported(-Wno-gnu-zero-variadic-macro-arguments) | ||
121 | endif() | 123 | endif() | ||
122 | if (CMAKE_COMPILER_CXX_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | 124 | if (CMAKE_COMPILER_CXX_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
123 | add_compile_flag_if_supported(-pedantic) | 125 | add_compile_flag_if_supported(-pedantic) | ||
124 | endif() | 126 | endif() | ||
125 | 127 | | |||
126 | include_directories(${KDevelop_SOURCE_DIR} ${KDevelop_BINARY_DIR}) | 128 | include_directories(${KDevelop_SOURCE_DIR} ${KDevelop_BINARY_DIR}) | ||
▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines |