From 53c7a7d3a52d2a0b1950f61d0d816fb5886f0cb7 Mon Sep 17 00:00:00 2001 From: Vladislav Shchapov Date: Tue, 17 Dec 2024 18:44:53 +0500 Subject: [PATCH] Fix deprecation warning: Compatibility with CMake < 3.10 will be removed from a future version of CMake. Signed-off-by: Vladislav Shchapov --- CMakeLists.txt | 7 ++++++- cmake/python/test_launcher.cmake | 7 ++++++- examples/CMakeLists.txt | 4 ++-- examples/common/gui/CMakeLists.txt | 4 ++-- examples/concurrent_hash_map/count_strings/CMakeLists.txt | 4 ++-- .../concurrent_priority_queue/shortpath/CMakeLists.txt | 4 ++-- examples/getting_started/sub_string_finder/CMakeLists.txt | 4 ++-- examples/graph/binpack/CMakeLists.txt | 4 ++-- examples/graph/cholesky/CMakeLists.txt | 4 ++-- examples/graph/dining_philosophers/CMakeLists.txt | 4 ++-- examples/graph/fgbzip2/CMakeLists.txt | 4 ++-- examples/graph/logic_sim/CMakeLists.txt | 4 ++-- examples/graph/som/CMakeLists.txt | 4 ++-- examples/migration/recursive_fibonacci/CMakeLists.txt | 4 ++-- examples/parallel_for/game_of_life/CMakeLists.txt | 4 ++-- examples/parallel_for/polygon_overlay/CMakeLists.txt | 4 ++-- examples/parallel_for/seismic/CMakeLists.txt | 4 ++-- examples/parallel_for/tachyon/CMakeLists.txt | 2 +- .../parallel_for_each/parallel_preorder/CMakeLists.txt | 4 ++-- examples/parallel_pipeline/square/CMakeLists.txt | 4 ++-- examples/parallel_reduce/convex_hull/CMakeLists.txt | 4 ++-- examples/parallel_reduce/pi/CMakeLists.txt | 4 ++-- examples/parallel_reduce/primes/CMakeLists.txt | 4 ++-- examples/task_arena/fractal/CMakeLists.txt | 4 ++-- examples/task_group/sudoku/CMakeLists.txt | 4 ++-- examples/test_all/fibonacci/CMakeLists.txt | 4 ++-- 26 files changed, 59 insertions(+), 49 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 34a526b069..20c5ee08d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) # Enable CMake policies @@ -35,6 +35,11 @@ elseif (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) message(FATAL_ERROR "CMAKE_MSVC_RUNTIME_LIBRARY was defined while policy CMP0091 is not available. Use CMake 3.15 or newer.") endif() +if (POLICY CMP0148) + # CMake 3.27: The FindPythonInterp and FindPythonLibs modules are removed + cmake_policy(SET CMP0148 OLD) +endif() + if (TBB_WINDOWS_DRIVER AND (NOT ("${CMAKE_MSVC_RUNTIME_LIBRARY}" STREQUAL MultiThreaded OR "${CMAKE_MSVC_RUNTIME_LIBRARY}" STREQUAL MultiThreadedDebug))) message(FATAL_ERROR "Enabled TBB_WINDOWS_DRIVER requires CMAKE_MSVC_RUNTIME_LIBRARY to be set to MultiThreaded or MultiThreadedDebug.") endif() diff --git a/cmake/python/test_launcher.cmake b/cmake/python/test_launcher.cmake index 9b1bdde988..70dc44d96a 100644 --- a/cmake/python/test_launcher.cmake +++ b/cmake/python/test_launcher.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2021 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,6 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +if (POLICY CMP0148) + # CMake 3.27: The FindPythonInterp and FindPythonLibs modules are removed + cmake_policy(SET CMP0148 OLD) +endif() + find_package(PythonInterp 3.5 REQUIRED) file(GLOB_RECURSE MODULES_LIST "${PYTHON_MODULE_BUILD_PATH}/*TBB.py*" ) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 16f1c4552a..314b0b61bd 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(tbb_examples CXX) diff --git a/examples/common/gui/CMakeLists.txt b/examples/common/gui/CMakeLists.txt index ea8b0060aa..6a27a4ddb6 100644 --- a/examples/common/gui/CMakeLists.txt +++ b/examples/common/gui/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) set(EXAMPLES_UI_MODE "con" CACHE STRING "EXAMPLES_UI_MODE") diff --git a/examples/concurrent_hash_map/count_strings/CMakeLists.txt b/examples/concurrent_hash_map/count_strings/CMakeLists.txt index 77efd2f66f..95d6f347ff 100644 --- a/examples/concurrent_hash_map/count_strings/CMakeLists.txt +++ b/examples/concurrent_hash_map/count_strings/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(count_strings CXX) diff --git a/examples/concurrent_priority_queue/shortpath/CMakeLists.txt b/examples/concurrent_priority_queue/shortpath/CMakeLists.txt index 624a59285f..6a84674bc9 100644 --- a/examples/concurrent_priority_queue/shortpath/CMakeLists.txt +++ b/examples/concurrent_priority_queue/shortpath/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(shortpath CXX) diff --git a/examples/getting_started/sub_string_finder/CMakeLists.txt b/examples/getting_started/sub_string_finder/CMakeLists.txt index 91792dde1d..125b50544e 100644 --- a/examples/getting_started/sub_string_finder/CMakeLists.txt +++ b/examples/getting_started/sub_string_finder/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(sub_string_finder_simple CXX) project(sub_string_finder_extended CXX) diff --git a/examples/graph/binpack/CMakeLists.txt b/examples/graph/binpack/CMakeLists.txt index 3d3b79215a..6ec14160e5 100644 --- a/examples/graph/binpack/CMakeLists.txt +++ b/examples/graph/binpack/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(binpack CXX) diff --git a/examples/graph/cholesky/CMakeLists.txt b/examples/graph/cholesky/CMakeLists.txt index 2e8273ae71..c31d94485e 100644 --- a/examples/graph/cholesky/CMakeLists.txt +++ b/examples/graph/cholesky/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(cholesky CXX) diff --git a/examples/graph/dining_philosophers/CMakeLists.txt b/examples/graph/dining_philosophers/CMakeLists.txt index d46af59b1d..8e4c4bfa02 100644 --- a/examples/graph/dining_philosophers/CMakeLists.txt +++ b/examples/graph/dining_philosophers/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(dining_philosophers CXX) diff --git a/examples/graph/fgbzip2/CMakeLists.txt b/examples/graph/fgbzip2/CMakeLists.txt index 7a9142a52c..30216e6787 100644 --- a/examples/graph/fgbzip2/CMakeLists.txt +++ b/examples/graph/fgbzip2/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(fgbzip2 CXX) diff --git a/examples/graph/logic_sim/CMakeLists.txt b/examples/graph/logic_sim/CMakeLists.txt index 99e1cc8f0b..f129a264f3 100644 --- a/examples/graph/logic_sim/CMakeLists.txt +++ b/examples/graph/logic_sim/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(logic_sim CXX) diff --git a/examples/graph/som/CMakeLists.txt b/examples/graph/som/CMakeLists.txt index c2dd1a8088..2bcd98523a 100644 --- a/examples/graph/som/CMakeLists.txt +++ b/examples/graph/som/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) include(../../common/cmake/common.cmake) project(som CXX) diff --git a/examples/migration/recursive_fibonacci/CMakeLists.txt b/examples/migration/recursive_fibonacci/CMakeLists.txt index 57e027cfbf..240c45c329 100644 --- a/examples/migration/recursive_fibonacci/CMakeLists.txt +++ b/examples/migration/recursive_fibonacci/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Intel Corporation +# Copyright (c) 2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(recursive_fibonacci CXX) diff --git a/examples/parallel_for/game_of_life/CMakeLists.txt b/examples/parallel_for/game_of_life/CMakeLists.txt index 596342424c..d7db83a341 100644 --- a/examples/parallel_for/game_of_life/CMakeLists.txt +++ b/examples/parallel_for/game_of_life/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(game_of_life CXX) diff --git a/examples/parallel_for/polygon_overlay/CMakeLists.txt b/examples/parallel_for/polygon_overlay/CMakeLists.txt index a45aaa6824..c898a088c2 100644 --- a/examples/parallel_for/polygon_overlay/CMakeLists.txt +++ b/examples/parallel_for/polygon_overlay/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(polygon_overlay CXX) diff --git a/examples/parallel_for/seismic/CMakeLists.txt b/examples/parallel_for/seismic/CMakeLists.txt index 61675f19a5..14e665e89b 100644 --- a/examples/parallel_for/seismic/CMakeLists.txt +++ b/examples/parallel_for/seismic/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(seismic CXX) diff --git a/examples/parallel_for/tachyon/CMakeLists.txt b/examples/parallel_for/tachyon/CMakeLists.txt index 752fddeff1..170663c9ae 100644 --- a/examples/parallel_for/tachyon/CMakeLists.txt +++ b/examples/parallel_for/tachyon/CMakeLists.txt @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(tachyon CXX) diff --git a/examples/parallel_for_each/parallel_preorder/CMakeLists.txt b/examples/parallel_for_each/parallel_preorder/CMakeLists.txt index 8e98d3604f..582a98e1ef 100644 --- a/examples/parallel_for_each/parallel_preorder/CMakeLists.txt +++ b/examples/parallel_for_each/parallel_preorder/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(parallel_preorder CXX) diff --git a/examples/parallel_pipeline/square/CMakeLists.txt b/examples/parallel_pipeline/square/CMakeLists.txt index 184c787ed9..e7c415bf79 100644 --- a/examples/parallel_pipeline/square/CMakeLists.txt +++ b/examples/parallel_pipeline/square/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(square CXX) diff --git a/examples/parallel_reduce/convex_hull/CMakeLists.txt b/examples/parallel_reduce/convex_hull/CMakeLists.txt index 0492244a6a..0a6efe1147 100644 --- a/examples/parallel_reduce/convex_hull/CMakeLists.txt +++ b/examples/parallel_reduce/convex_hull/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(convex_hull_bench CXX) project(convex_hull_sample CXX) diff --git a/examples/parallel_reduce/pi/CMakeLists.txt b/examples/parallel_reduce/pi/CMakeLists.txt index 62ebe022f7..71d92aed9d 100644 --- a/examples/parallel_reduce/pi/CMakeLists.txt +++ b/examples/parallel_reduce/pi/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2023 Intel Corporation +# Copyright (c) 2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(pi CXX) diff --git a/examples/parallel_reduce/primes/CMakeLists.txt b/examples/parallel_reduce/primes/CMakeLists.txt index 987d4656cb..ae87c0a347 100644 --- a/examples/parallel_reduce/primes/CMakeLists.txt +++ b/examples/parallel_reduce/primes/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(primes CXX) diff --git a/examples/task_arena/fractal/CMakeLists.txt b/examples/task_arena/fractal/CMakeLists.txt index 857dae642e..26430e1d89 100644 --- a/examples/task_arena/fractal/CMakeLists.txt +++ b/examples/task_arena/fractal/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(fractal CXX) diff --git a/examples/task_group/sudoku/CMakeLists.txt b/examples/task_group/sudoku/CMakeLists.txt index f514662aba..b4dec0d5f0 100644 --- a/examples/task_group/sudoku/CMakeLists.txt +++ b/examples/task_group/sudoku/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2020-2023 Intel Corporation +# Copyright (c) 2020-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(sudoku CXX) diff --git a/examples/test_all/fibonacci/CMakeLists.txt b/examples/test_all/fibonacci/CMakeLists.txt index 3b2368e06c..1c6f800342 100644 --- a/examples/test_all/fibonacci/CMakeLists.txt +++ b/examples/test_all/fibonacci/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2019-2023 Intel Corporation +# Copyright (c) 2019-2024 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.5.0...3.31.2) project(fibonacci CXX)