From 84dc0511c141db14e5d8ae982661179a3061a6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20G=C3=BCnther?= Date: Fri, 31 Oct 2025 10:07:02 +0100 Subject: [PATCH] Bump CMake minimum required version to 3.10 Newer CMake v4.x dropped support for versions < 3.10 --- CMakeLists.txt | 14 +------------- common/cmake/FindTBB.cmake | 2 +- doc/src/compilation.md | 2 +- scripts/ospray/CMakeLists.txt | 2 +- tests/CMakeLists.txt | 4 ++-- tutorials/embree_info/CMakeLists.txt | 4 ++-- tutorials/find_embree/CMakeLists.txt | 2 +- tutorials/minimal/CMakeLists.txt | 2 +- 8 files changed, 10 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f215254fb..47076d84fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ ## Copyright 2009-2021 Intel Corporation ## SPDX-License-Identifier: Apache-2.0 -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) SET(EMBREE_VERSION_MAJOR 4) SET(EMBREE_VERSION_MINOR 4) @@ -57,27 +57,15 @@ IF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git") ENDIF() IF(COMMAND cmake_policy) - if (POLICY CMP0003) - cmake_policy(SET CMP0003 NEW) - endif() - if (POLICY CMP0042) - cmake_policy(SET CMP0042 NEW) - endif() if(POLICY CMP0072) cmake_policy(SET CMP0072 NEW) endif() - if(POLICY CMP0022) - cmake_policy(SET CMP0022 NEW) - endif() if(POLICY CMP0074) cmake_policy(SET CMP0074 NEW) endif() if(POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif() - if(POLICY CMP0057) - cmake_policy(SET CMP0057 NEW) - endif() ENDIF() MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY) diff --git a/common/cmake/FindTBB.cmake b/common/cmake/FindTBB.cmake index 2ff75b9f66..ed7db34dbe 100644 --- a/common/cmake/FindTBB.cmake +++ b/common/cmake/FindTBB.cmake @@ -37,7 +37,7 @@ #=============================================================================== # We use INTERFACE libraries, which are only supported in 3.x -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) # These two are used to automatically find the root and include directories. set(_TBB_INCLUDE_SUBDIR "include") diff --git a/doc/src/compilation.md b/doc/src/compilation.md index 0a686c4756..c8fc8b2899 100644 --- a/doc/src/compilation.md +++ b/doc/src/compilation.md @@ -48,7 +48,7 @@ installation, put the path to `ispc` permanently into your `PATH` environment variable or you set the `EMBREE_ISPC_EXECUTABLE` variable to point at the ISPC executable during CMake configuration. -You additionally have to install CMake 3.1.0 or higher and the developer +You additionally have to install CMake 3.10 or higher and the developer version of [GLFW](https://www.glfw.org/) version 3. Under macOS, all these dependencies can be installed diff --git a/scripts/ospray/CMakeLists.txt b/scripts/ospray/CMakeLists.txt index b9260b058a..79909ec733 100644 --- a/scripts/ospray/CMakeLists.txt +++ b/scripts/ospray/CMakeLists.txt @@ -3,7 +3,7 @@ ## Global settings ## -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.10) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/dependencies) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e4f8922c81..e2828acb07 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -50,7 +50,7 @@ IF (EMBREE_TESTING_INSTALL_TESTS) "# Copyright 2009-2021 Intel Corporation\n" "# SPDX-License-Identifier: Apache-2.0\n" "# This file was automatically generated\n" - "cmake_minimum_required(VERSION 3.5)\n" + "cmake_minimum_required(VERSION 3.10)\n" "\n" "project(embree-testing)\n" "\n" @@ -119,4 +119,4 @@ IF (EMBREE_TESTING_INSTALL_TESTS) DESTINATION "${CMAKE_INSTALL_TESTDIR}" COMPONENT testing) -ENDIF() \ No newline at end of file +ENDIF() diff --git a/tutorials/embree_info/CMakeLists.txt b/tutorials/embree_info/CMakeLists.txt index 6d3988a3b6..6c111b9701 100644 --- a/tutorials/embree_info/CMakeLists.txt +++ b/tutorials/embree_info/CMakeLists.txt @@ -2,7 +2,7 @@ ## SPDX-License-Identifier: Apache-2.0 PROJECT(embree_info) -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) IF (NOT EMBREE_PROJECT_COMPILATION) FIND_PACKAGE(embree REQUIRED) @@ -33,4 +33,4 @@ IF (COMMAND SIGN_TARGET) SIGN_TARGET(embree_info) ENDIF() -ADD_EMBREE_GENERIC_TEST(embree_info embree_info) \ No newline at end of file +ADD_EMBREE_GENERIC_TEST(embree_info embree_info) diff --git a/tutorials/find_embree/CMakeLists.txt b/tutorials/find_embree/CMakeLists.txt index d526e19e74..4db9b70300 100644 --- a/tutorials/find_embree/CMakeLists.txt +++ b/tutorials/find_embree/CMakeLists.txt @@ -2,7 +2,7 @@ ## SPDX-License-Identifier: Apache-2.0 PROJECT(find_embree) -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) FIND_PACKAGE(embree REQUIRED) diff --git a/tutorials/minimal/CMakeLists.txt b/tutorials/minimal/CMakeLists.txt index ffa93bf4ed..72bf41891a 100644 --- a/tutorials/minimal/CMakeLists.txt +++ b/tutorials/minimal/CMakeLists.txt @@ -2,7 +2,7 @@ ## SPDX-License-Identifier: Apache-2.0 PROJECT(minimal) -CMAKE_MINIMUM_REQUIRED(VERSION 3.5) +CMAKE_MINIMUM_REQUIRED(VERSION 3.10) IF (NOT EMBREE_PROJECT_COMPILATION) FIND_PACKAGE(embree REQUIRED)