diff --git a/CMakeLists.txt b/CMakeLists.txt index 0416364300..b7a4d68385 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.3) # 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..5d6ebe864f 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.3) project(tbb_examples CXX) diff --git a/examples/common/gui/CMakeLists.txt b/examples/common/gui/CMakeLists.txt index ea8b0060aa..744a7a438e 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.3) 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..9718175151 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.3) project(count_strings CXX) diff --git a/examples/concurrent_priority_queue/shortpath/CMakeLists.txt b/examples/concurrent_priority_queue/shortpath/CMakeLists.txt index 624a59285f..b25a6235a8 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.3) 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..5ef28fa0f6 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.3) 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..dd06540e64 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.3) project(binpack CXX) diff --git a/examples/graph/cholesky/CMakeLists.txt b/examples/graph/cholesky/CMakeLists.txt index 2e8273ae71..493e97ca42 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.3) project(cholesky CXX) diff --git a/examples/graph/dining_philosophers/CMakeLists.txt b/examples/graph/dining_philosophers/CMakeLists.txt index d46af59b1d..302db2dfce 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.3) project(dining_philosophers CXX) diff --git a/examples/graph/fgbzip2/CMakeLists.txt b/examples/graph/fgbzip2/CMakeLists.txt index 7a9142a52c..a402862d47 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.3) project(fgbzip2 CXX) diff --git a/examples/graph/logic_sim/CMakeLists.txt b/examples/graph/logic_sim/CMakeLists.txt index 99e1cc8f0b..9485b41f37 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.3) project(logic_sim CXX) diff --git a/examples/graph/som/CMakeLists.txt b/examples/graph/som/CMakeLists.txt index c2dd1a8088..f9cf97f53d 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.3) 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..8f1e6b3a13 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.3) 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..ce0a9b5426 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.3) 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..157f2ca4ad 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.3) project(polygon_overlay CXX) diff --git a/examples/parallel_for/seismic/CMakeLists.txt b/examples/parallel_for/seismic/CMakeLists.txt index 61675f19a5..36e4d625a4 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.3) project(seismic CXX) diff --git a/examples/parallel_for/tachyon/CMakeLists.txt b/examples/parallel_for/tachyon/CMakeLists.txt index 752fddeff1..4419a57fb0 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.3) 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..fd5b86b660 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.3) project(parallel_preorder CXX) diff --git a/examples/parallel_pipeline/square/CMakeLists.txt b/examples/parallel_pipeline/square/CMakeLists.txt index 184c787ed9..32e580aea4 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.3) project(square CXX) diff --git a/examples/parallel_reduce/convex_hull/CMakeLists.txt b/examples/parallel_reduce/convex_hull/CMakeLists.txt index 0492244a6a..cb7981e28d 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.3) 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..2347260d31 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.3) project(pi CXX) diff --git a/examples/parallel_reduce/primes/CMakeLists.txt b/examples/parallel_reduce/primes/CMakeLists.txt index 987d4656cb..21bd16c43e 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.3) project(primes CXX) diff --git a/examples/task_arena/fractal/CMakeLists.txt b/examples/task_arena/fractal/CMakeLists.txt index 857dae642e..0d8dbf74e0 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.3) project(fractal CXX) diff --git a/examples/task_group/sudoku/CMakeLists.txt b/examples/task_group/sudoku/CMakeLists.txt index f514662aba..9d92341727 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.3) project(sudoku CXX) diff --git a/examples/test_all/fibonacci/CMakeLists.txt b/examples/test_all/fibonacci/CMakeLists.txt index 3b2368e06c..9643785ed5 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.3) project(fibonacci CXX)