Changeset View
Changeset View
Standalone View
Standalone View
kde-modules/KDECompilerSettings.cmake
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Line(s) | |||||
199 | 199 | | |||
200 | 200 | | |||
201 | 201 | | |||
202 | ############################################################ | 202 | ############################################################ | ||
203 | # Language and toolchain features | 203 | # Language and toolchain features | ||
204 | ############################################################ | 204 | ############################################################ | ||
205 | 205 | | |||
206 | # Pick sensible versions of the C and C++ standards. | 206 | # Pick sensible versions of the C and C++ standards. | ||
207 | if (NOT CMAKE_C_STANDARD) | ||||
207 | set(CMAKE_C_STANDARD 90) | 208 | set(CMAKE_C_STANDARD 90) | ||
209 | endif() | ||||
210 | if (NOT CMAKE_CXX_STANDARD) | ||||
208 | set(CMAKE_CXX_STANDARD 11) | 211 | set(CMAKE_CXX_STANDARD 11) | ||
209 | set(CMAKE_CXX_STANDARD_REQUIRED True) | 212 | set(CMAKE_CXX_STANDARD_REQUIRED True) | ||
213 | endif() | ||||
210 | 214 | | |||
211 | # Do not merge uninitialized global variables. | 215 | # Do not merge uninitialized global variables. | ||
212 | # This is mostly a "principle of least surprise" thing, but also | 216 | # This is mostly a "principle of least surprise" thing, but also | ||
213 | # has performance benefits. | 217 | # has performance benefits. | ||
214 | # See https://www.ibm.com/developerworks/community/blogs/zTPF/entry/benefits_of_the_fnocommon_compile_option_peter_lemieszewski?lang=en | 218 | # See https://www.ibm.com/developerworks/community/blogs/zTPF/entry/benefits_of_the_fnocommon_compile_option_peter_lemieszewski?lang=en | ||
215 | # Note that this only applies to C code; C++ already behaves like this. | 219 | # Note that this only applies to C code; C++ already behaves like this. | ||
216 | if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR | 220 | if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR | ||
217 | CMAKE_C_COMPILER_ID MATCHES "Clang" OR | 221 | CMAKE_C_COMPILER_ID MATCHES "Clang" OR | ||
▲ Show 20 Lines • Show All 295 Lines • Show Last 20 Lines |