File tree 2 files changed +6
-14
lines changed
2 files changed +6
-14
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,6 @@ This ``CMakeLists.txt`` file will be used by ``setup.py``.
18
18
19
19
cmake_minimum_required (VERSION 3.21...3.27 FATAL_ERROR)
20
20
21
- if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24" )
22
- cmake_policy (SET CMP0135 NEW)
23
- endif ()
24
-
25
21
message (STATUS "NUMBA_DPEX_VERSION=" "${NUMBA_DPEX_VERSION} " )
26
22
27
23
project (numba-dpex
Original file line number Diff line number Diff line change @@ -78,10 +78,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SKBUILD_MODULE_PATH})
78
78
message (STATUS "CMAKE_MODULE_PATH=" "${CMAKE_MODULE_PATH} " )
79
79
80
80
# Add packages
81
- find_package (PythonLibs REQUIRED)
82
- find_package (PythonExtensions REQUIRED)
83
- find_package (NumPy REQUIRED)
81
+ find_package (Python 3.9 REQUIRED
82
+ COMPONENTS Interpreter Development.Module NumPy)
84
83
find_package (Dpctl REQUIRED)
84
+ find_package (NumPy REQUIRED)
85
85
86
86
# Includes
87
87
include (GNUInstallDirs)
@@ -98,14 +98,10 @@ file(GLOB SOURCES "*.c")
98
98
link_directories (${DPCTL_LIBRARY_PATH} )
99
99
100
100
# Output static library, *.so or *.dll
101
- add_library (${PROJECT_NAME} MODULE ${SOURCES} )
102
-
103
- # Link the static library to python libraries and DPCTLSyclInterface
104
- target_link_libraries (${PROJECT_NAME} ${Python_LIBRARIES} )
105
- target_link_libraries (${PROJECT_NAME} DPCTLSyclInterface)
101
+ python_add_library(${PROJECT_NAME} MODULE ${SOURCES} )
106
102
107
- # Build python extension module
108
- python_extension_module (${PROJECT_NAME} )
103
+ # Link the DPCTLSyclInterface library to target
104
+ target_link_libraries (${PROJECT_NAME} PRIVATE DPCTLSyclInterface )
109
105
110
106
# If IS_DEVELOP, copy back the target into numba_dpex/core/runtime
111
107
if (IS_DEVELOP)
You can’t perform that action at this time.
0 commit comments