Bump CMake minimum required version to 3.10, closes #15

This commit is contained in:
Johannes Günther
2025-10-29 15:04:28 +01:00
parent 1576bad9eb
commit 969c08b532
4 changed files with 5 additions and 49 deletions
+1 -5
View File
@@ -3,11 +3,7 @@
## Global CMake options ##
if (RKCOMMON_TASKING_SYSTEM STREQUAL "OpenMP")
cmake_minimum_required(VERSION 3.9) # NOTE(jda): rely on OpenMP targets
else()
cmake_minimum_required(VERSION 3.5)
endif()
cmake_minimum_required(VERSION 3.10)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+1 -1
View File
@@ -5,7 +5,7 @@ used by various components of Intel® Rendering Toolkit (Render Kit).
### Requirements
- CMake
- CMake v3.10 or higher
- C++11 compiler
- TBB 4.4.3 or higher (by default, other tasking system options available via
the `RKCOMMON_TASKING_SYSTEM` CMake variable)
+1 -2
View File
@@ -36,8 +36,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")
+2 -41
View File
@@ -1,45 +1,6 @@
## Copyright 2009 Intel Corporation
## SPDX-License-Identifier: Apache-2.0
# use a backported version of find_dependency(), renamed as
# find_dependency_39(), from CMake 3.9.0, which correctly supports passing
# components to find_package(). this allows us to maintain our current minimum
# CMake version of 3.1.
macro(find_dependency_39 dep)
if (NOT ${dep}_FOUND)
set(cmake_fd_quiet_arg)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(cmake_fd_quiet_arg QUIET)
endif()
set(cmake_fd_required_arg)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
set(cmake_fd_required_arg REQUIRED)
endif()
get_property(cmake_fd_alreadyTransitive GLOBAL PROPERTY
_CMAKE_${dep}_TRANSITIVE_DEPENDENCY
)
find_package(${dep} ${ARGN}
${cmake_fd_quiet_arg}
${cmake_fd_required_arg}
)
if(NOT DEFINED cmake_fd_alreadyTransitive OR cmake_fd_alreadyTransitive)
set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE)
endif()
if (NOT ${dep}_FOUND)
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
return()
endif()
set(cmake_fd_required_arg)
set(cmake_fd_quiet_arg)
set(cmake_fd_exact_arg)
endif()
endmacro()
## Macro for printing CMake variables ##
macro(print var)
message("${var} = ${${var}}")
@@ -210,7 +171,7 @@ macro(rkcommon_create_tasking_target FROM_INSTALL)
# If not found try getting older TBB via module (FindTBB.cmake)
unset(TBB_DIR CACHE)
if (${FROM_INSTALL})
find_dependency_39(TBB 4.4 REQUIRED tbb tbbmalloc)
find_dependency(TBB 4.4 REQUIRED tbb tbbmalloc)
else()
find_package(TBB 4.4 REQUIRED tbb tbbmalloc)
endif()
@@ -220,7 +181,7 @@ macro(rkcommon_create_tasking_target FROM_INSTALL)
endif()
endif()
elseif(RKCOMMON_TASKING_OPENMP)
find_dependency_39(OpenMP)
find_dependency(OpenMP)
if (OPENMP_FOUND)
list(APPEND RKCOMMON_TASKING_LIBS OpenMP::OpenMP_CXX)
set(RKCOMMON_TASKING_DEFINITIONS RKCOMMON_TASKING_OMP)