Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix find_package#321

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
mircomarahrens wants to merge4 commits intoxtensor-stack:master
base:master
Choose a base branch
Loading
frommircomarahrens:master
Draft
Show file tree
Hide file tree
Changes fromall 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
14 changes: 5 additions & 9 deletionsCMakeLists.txt
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -49,7 +49,9 @@ endif()
# Running find_package(PythonInterp) to retrieve the Python version
# which is not exported by Pybind11's cmake.
# Cf. https://github.com/pybind/pybind11/issues/2268
find_package(PythonInterp ${PythonLibsNew_FIND_VERSION} REQUIRED)
#find_package(PythonInterp ${PythonLibsNew_FIND_VERSION} REQUIRED)
# the above line uses a deprecated cmake method, use the following instead
find_package(Python COMPONENTS Interpreter Development.Module NumPy REQUIRED)

set(pybind11_REQUIRED_VERSION 2.6.1)
if(TARGET pybind11 OR TARGET pybind11::headers)
Expand All@@ -60,13 +62,7 @@ else()
message(STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS}/pybind11")
endif()

# Look for NumPy headers, except if NUMPY_INCLUDE_DIRS is passed,
# which is required under some circumstances (such as wasm, where
# there is no real python executable)
if(NOT NUMPY_INCLUDE_DIRS)
find_package(NumPy REQUIRED)
endif()
message(STATUS "Found numpy: ${NUMPY_INCLUDE_DIRS}")
message(STATUS "Found numpy: ${Python_NumPy_INCLUDE_DIR}")

# Build
# =====
Expand All@@ -85,7 +81,7 @@ set(XTENSOR_PYTHON_HEADERS

add_library(xtensor-python INTERFACE)
target_include_directories(xtensor-python INTERFACE
"$<BUILD_INTERFACE:${XTENSOR_PYTHON_INCLUDE_DIR};${pybind11_INCLUDE_DIRS};${NUMPY_INCLUDE_DIRS}>"
"$<BUILD_INTERFACE:${XTENSOR_PYTHON_INCLUDE_DIR};${pybind11_INCLUDE_DIRS};${Python_NumPy_INCLUDE_DIR}>"
$<INSTALL_INTERFACE:include>)
target_link_libraries(xtensor-python INTERFACE xtensor)
get_target_property(inc_dir xtensor-python INTERFACE_INCLUDE_DIRECTORIES)
Expand Down
89 changes: 0 additions & 89 deletionscmake/FindNumPy.cmake
View file
Open in desktop

This file was deleted.


[8]ページ先頭

©2009-2025 Movatter.jp