|
1 | | -cmake_minimum_required (VERSION 2.8.11) |
| 1 | +cmake_minimum_required (VERSION 3.22) |
2 | 2 | project (upm) |
3 | 3 |
|
4 | 4 | # Before going any further, define build options |
@@ -260,37 +260,14 @@ set (upm_VERSION_STRING ${upm_VERSION_MAJOR}.${upm_VERSION_MINOR}.${upm_VERSION_ |
260 | 260 |
|
261 | 261 | # enable c++11 standards support unconditionally |
262 | 262 | include(CheckCXXCompilerFlag) |
263 | | -if (CMAKE_VERSION VERSION_LESS "3.1") |
264 | | - CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) |
265 | | - CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X) |
266 | | - if (COMPILER_SUPPORTS_CXX11) |
267 | | - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") |
268 | | - elseif (COMPILER_SUPPORTS_CXX0X) |
269 | | - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") |
270 | | - else() |
271 | | - message(FATAL_ERROR "A C++11 compliant compiler is required to build UPM.") |
272 | | - endif() |
273 | | -else() |
274 | | - # 3.1+ uses this generic method to enable c++11 |
275 | | - set (CMAKE_CXX_STANDARD 11) |
276 | | - set (CXX_STANDARD_REQUIRED ON) |
277 | | - set (CXX_EXTENSIONS OFF) |
278 | | -endif() |
| 263 | +set (CMAKE_CXX_STANDARD 11) |
| 264 | +set (CXX_STANDARD_REQUIRED ON) |
| 265 | +set (CXX_EXTENSIONS OFF) |
279 | 266 |
|
280 | 267 | include(CheckCCompilerFlag) |
281 | | -if (CMAKE_VERSION VERSION_LESS "3.1") |
282 | | - CHECK_C_COMPILER_FLAG("-std=c11" COMPILER_SUPPORTS_C11) |
283 | | - if (COMPILER_SUPPORTS_C11) |
284 | | - set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") |
285 | | - else() |
286 | | - message(FATAL_ERROR "A C11 compliant C compiler is required to build UPM.") |
287 | | - endif() |
288 | | -else() |
289 | | - # 3.1+ uses this generic method to enable c11 |
290 | | - set (CMAKE_C_STANDARD 11) |
291 | | - set (C_STANDARD_REQUIRED ON) |
292 | | - set (C_EXTENSIONS OFF) |
293 | | -endif() |
| 268 | +set (CMAKE_C_STANDARD 11) |
| 269 | +set (C_STANDARD_REQUIRED ON) |
| 270 | +set (C_EXTENSIONS OFF) |
294 | 271 |
|
295 | 272 | # The doc target depends on the C/C++ source and all libraries |
296 | 273 | # |
|
0 commit comments