Skip to content

Commit b528b10

Browse files
Use cmake_minimum_required with min...max
1 parent 5bd924e commit b528b10

File tree

6 files changed

+24
-22
lines changed

6 files changed

+24
-22
lines changed

CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
cmake_minimum_required(VERSION 3.21...3.27 FATAL_ERROR)
22

33
project(dpctl
4+
VERSION 0.15
45
LANGUAGES CXX
56
DESCRIPTION "Python interface for XPU programming"
67
)

examples/pybind11/external_usm_allocation/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
cmake_minimum_required(VERSION 3.21)
1+
cmake_minimum_required(VERSION 3.21...3.27 FATAL_ERROR)
22

3-
project(external_usm_allocation LANGUAGES CXX)
3+
project(external_usm_allocation VERSION 0.1 LANGUAGES CXX
4+
DESCRIPTION "Example of passing external C++ USM allocation to Python")
45

56
set(DPCTL_CMAKE_MODULES_PATH "${CMAKE_SOURCE_DIR}/../../../cmake")
67
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DPCTL_CMAKE_MODULES_PATH})
@@ -13,14 +14,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
1314
include(FetchContent)
1415
FetchContent_Declare(
1516
pybind11
16-
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.10.2.tar.gz
17-
URL_HASH SHA256=93bd1e625e43e03028a3ea7389bba5d3f9f2596abc074b068e70f4ef9b1314ae
17+
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.11.1.tar.gz
18+
URL_HASH SHA256=d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c
1819
)
1920
FetchContent_MakeAvailable(pybind11)
2021

21-
find_package(PythonExtensions REQUIRED)
22+
find_package(Python REQUIRED COMPONENTS Development.Module NumPy)
2223
find_package(Dpctl REQUIRED)
23-
find_package(NumPy REQUIRED)
2424

2525
set(py_module_name _external_usm_alloc)
2626
pybind11_add_module(${py_module_name}

examples/pybind11/onemkl_gemv/CMakeLists.txt

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
cmake_minimum_required(VERSION 3.22 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.22...3.27 FATAL_ERROR)
22

3-
project(example_use_mkl_gemm LANGUAGES CXX)
3+
project(example_use_mkl_gemm VERSION 0.1 LANGUAGES CXX
4+
DESCRIPTION "Example of using Python wrapper to oneMKL function")
45
set(DPCTL_CMAKE_MODULES_PATH "${CMAKE_SOURCE_DIR}/../../../cmake")
56
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DPCTL_CMAKE_MODULES_PATH})
67
find_package(IntelDPCPP REQUIRED PATHS ${DPCTL_CMAKE_MODULES_PATH} NO_DEFAULT_PATH)
@@ -17,12 +18,12 @@ include(GNUInstallDirs)
1718
include(FetchContent)
1819
FetchContent_Declare(
1920
pybind11
20-
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.10.2.tar.gz
21-
URL_HASH SHA256=93bd1e625e43e03028a3ea7389bba5d3f9f2596abc074b068e70f4ef9b1314ae
21+
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.11.1.tar.gz
22+
URL_HASH SHA256=d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c
2223
)
2324
FetchContent_MakeAvailable(pybind11)
2425

25-
find_package(PythonExtensions REQUIRED)
26+
find_package(Python REQUIRED COMPONENTS Development.Module NumPy)
2627
find_package(Dpctl REQUIRED)
2728

2829
find_library(mkl_core NAMES mkl_core PATHS ${MKL_LIBRARY_DIR} REQUIRED)

examples/pybind11/use_dpctl_sycl_kernel/CMakeLists.txt

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
cmake_minimum_required(VERSION 3.21)
1+
cmake_minimum_required(VERSION 3.21...3.27 FATAL_ERROR)
22

3-
project(use_queue_device LANGUAGES CXX)
3+
project(use_queue_device VERSION 0.1 LANGUAGES CXX
4+
DESCRIPTION "Example of using dpctl.program.SyclKernel <-> sycl::kernel type casting")
45

56
set(DPCTL_CMAKE_MODULES_PATH "${CMAKE_SOURCE_DIR}/../../../cmake")
67
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DPCTL_CMAKE_MODULES_PATH})
@@ -19,9 +20,8 @@ FetchContent_Declare(
1920
)
2021
FetchContent_MakeAvailable(pybind11)
2122

22-
find_package(PythonExtensions REQUIRED)
23+
find_package(Python REQUIRED COMPONENTS Development.Module NumPy)
2324
find_package(Dpctl REQUIRED)
24-
find_package(NumPy REQUIRED)
2525

2626
set(py_module_name _use_kernel)
2727
pybind11_add_module(${py_module_name}

examples/pybind11/use_dpctl_sycl_queue/CMakeLists.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
cmake_minimum_required(VERSION 3.21)
1+
cmake_minimum_required(VERSION 3.21...3.27 FATAL_ERROR)
22

3-
project(use_queue_device LANGUAGES CXX)
3+
project(use_queue_device VERSION 0.1 LANGUAGES CXX
4+
DESCRIPTION "Example of using dpctl.SyclQueue <-> sycl::queue type caster")
45

56
set(DPCTL_CMAKE_MODULES_PATH "${CMAKE_SOURCE_DIR}/../../../cmake")
67
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${DPCTL_CMAKE_MODULES_PATH})
@@ -13,14 +14,13 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
1314
include(FetchContent)
1415
FetchContent_Declare(
1516
pybind11
16-
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.10.2.tar.gz
17-
URL_HASH SHA256=93bd1e625e43e03028a3ea7389bba5d3f9f2596abc074b068e70f4ef9b1314ae
17+
URL https://github.com/pybind/pybind11/archive/refs/tags/v2.11.1.tar.gz
18+
URL_HASH SHA256=d475978da0cdc2d43b73f30910786759d593a9d8ee05b1b6846d1eb16c6d2e0c
1819
)
1920
FetchContent_MakeAvailable(pybind11)
2021

21-
find_package(PythonExtensions REQUIRED)
22+
find_package(Python REQUIRED COMPONENTS Development.Module NumPy)
2223
find_package(Dpctl REQUIRED)
23-
find_package(NumPy REQUIRED)
2424

2525
set(py_module_name _use_queue_device)
2626
pybind11_add_module(${py_module_name}

libsyclinterface/cmake/modules/GetProjectVersion.cmake

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# VERSION_MINOR
3030
# VERSION
3131
# SEMVER
32-
cmake_minimum_required( VERSION 3.14.0 )
32+
cmake_minimum_required(VERSION 3.14...3.27 FATAL_ERROR )
3333

3434
function(get_version)
3535
# Use git describe to get latest tag name

0 commit comments

Comments
 (0)