Skip to content

Remove deprecated FindPythonLibs #1127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ This ``CMakeLists.txt`` file will be used by ``setup.py``.

cmake_minimum_required(VERSION 3.21...3.27 FATAL_ERROR)

if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24")
cmake_policy(SET CMP0135 NEW)
endif()

message(STATUS "NUMBA_DPEX_VERSION=" "${NUMBA_DPEX_VERSION}")

project(numba-dpex
Expand Down
16 changes: 6 additions & 10 deletions numba_dpex/core/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${SKBUILD_MODULE_PATH})
message(STATUS "CMAKE_MODULE_PATH=" "${CMAKE_MODULE_PATH}")

# Add packages
find_package(PythonLibs REQUIRED)
find_package(PythonExtensions REQUIRED)
find_package(NumPy REQUIRED)
find_package(Python 3.9 REQUIRED
COMPONENTS Interpreter Development.Module NumPy)
find_package(Dpctl REQUIRED)
find_package(NumPy REQUIRED)

# Includes
include(GNUInstallDirs)
Expand All @@ -98,14 +98,10 @@ file(GLOB SOURCES "*.c")
link_directories(${DPCTL_LIBRARY_PATH})

# Output static library, *.so or *.dll
add_library(${PROJECT_NAME} MODULE ${SOURCES})

# Link the static library to python libraries and DPCTLSyclInterface
target_link_libraries(${PROJECT_NAME} ${Python_LIBRARIES})
target_link_libraries(${PROJECT_NAME} DPCTLSyclInterface)
python_add_library(${PROJECT_NAME} MODULE ${SOURCES})

# Build python extension module
python_extension_module(${PROJECT_NAME})
# Link the DPCTLSyclInterface library to target
target_link_libraries(${PROJECT_NAME} PRIVATE DPCTLSyclInterface)

# If IS_DEVELOP, copy back the target into numba_dpex/core/runtime
if(IS_DEVELOP)
Expand Down