Skip to content

Commit 69396fa

Browse files
committed
Bump CMake minimum required version to 3.10, closes #15
1 parent db650be commit 69396fa

4 files changed

Lines changed: 5 additions & 49 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33

44
## Global CMake options ##
55

6-
if (RKCOMMON_TASKING_SYSTEM STREQUAL "OpenMP")
7-
cmake_minimum_required(VERSION 3.9) # NOTE(jda): rely on OpenMP targets
8-
else()
9-
cmake_minimum_required(VERSION 3.5)
10-
endif()
6+
cmake_minimum_required(VERSION 3.10)
117

128
set(CMAKE_CXX_STANDARD 11)
139
set(CMAKE_CXX_STANDARD_REQUIRED ON)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ used by various components of Intel® Rendering Toolkit (Render Kit).
55

66
### Requirements
77

8-
- CMake
8+
- CMake v3.10 or higher
99
- C++11 compiler
1010
- TBB 4.4.3 or higher (by default, other tasking system options available via
1111
the `RKCOMMON_TASKING_SYSTEM` CMake variable)

cmake/FindTBB.cmake

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
#
3737
#===============================================================================
3838

39-
# We use INTERFACE libraries, which are only supported in 3.x
40-
cmake_minimum_required(VERSION 3.5)
39+
cmake_minimum_required(VERSION 3.10)
4140

4241
# These two are used to automatically find the root and include directories.
4342
set(_TBB_INCLUDE_SUBDIR "include")

cmake/rkcommon_macros.cmake

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,6 @@
11
## Copyright 2009 Intel Corporation
22
## SPDX-License-Identifier: Apache-2.0
33

4-
# use a backported version of find_dependency(), renamed as
5-
# find_dependency_39(), from CMake 3.9.0, which correctly supports passing
6-
# components to find_package(). this allows us to maintain our current minimum
7-
# CMake version of 3.1.
8-
macro(find_dependency_39 dep)
9-
if (NOT ${dep}_FOUND)
10-
set(cmake_fd_quiet_arg)
11-
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
12-
set(cmake_fd_quiet_arg QUIET)
13-
endif()
14-
set(cmake_fd_required_arg)
15-
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
16-
set(cmake_fd_required_arg REQUIRED)
17-
endif()
18-
19-
get_property(cmake_fd_alreadyTransitive GLOBAL PROPERTY
20-
_CMAKE_${dep}_TRANSITIVE_DEPENDENCY
21-
)
22-
23-
find_package(${dep} ${ARGN}
24-
${cmake_fd_quiet_arg}
25-
${cmake_fd_required_arg}
26-
)
27-
28-
if(NOT DEFINED cmake_fd_alreadyTransitive OR cmake_fd_alreadyTransitive)
29-
set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE)
30-
endif()
31-
32-
if (NOT ${dep}_FOUND)
33-
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.")
34-
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
35-
return()
36-
endif()
37-
set(cmake_fd_required_arg)
38-
set(cmake_fd_quiet_arg)
39-
set(cmake_fd_exact_arg)
40-
endif()
41-
endmacro()
42-
434
## Macro for printing CMake variables ##
445
macro(print var)
456
message("${var} = ${${var}}")
@@ -210,7 +171,7 @@ macro(rkcommon_create_tasking_target FROM_INSTALL)
210171
# If not found try getting older TBB via module (FindTBB.cmake)
211172
unset(TBB_DIR CACHE)
212173
if (${FROM_INSTALL})
213-
find_dependency_39(TBB 4.4 REQUIRED tbb tbbmalloc)
174+
find_dependency(TBB 4.4 REQUIRED tbb tbbmalloc)
214175
else()
215176
find_package(TBB 4.4 REQUIRED tbb tbbmalloc)
216177
endif()
@@ -220,7 +181,7 @@ macro(rkcommon_create_tasking_target FROM_INSTALL)
220181
endif()
221182
endif()
222183
elseif(RKCOMMON_TASKING_OPENMP)
223-
find_dependency_39(OpenMP)
184+
find_dependency(OpenMP)
224185
if (OPENMP_FOUND)
225186
list(APPEND RKCOMMON_TASKING_LIBS OpenMP::OpenMP_CXX)
226187
set(RKCOMMON_TASKING_DEFINITIONS RKCOMMON_TASKING_OMP)

0 commit comments

Comments
 (0)