mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Improve pybind11 message (#11640)
Summary: Improving the message based on https://github.com/pytorch/pytorch/issues/11570 Pull Request resolved: https://github.com/pytorch/pytorch/pull/11640 Differential Revision: D10033383 Pulled By: orionr fbshipit-source-id: 0cdcdbe0582d896283a12970aebe771efa390dd2
This commit is contained in:
parent
364ae10bb8
commit
94c513cc7f
|
|
@ -402,13 +402,15 @@ find_package(pybind11 CONFIG)
|
|||
if((DEFINED pybind11_DIR) AND pybind11_DIR)
|
||||
get_target_property(pybind11_INCLUDE_DIRS pybind11::pybind11 INTERFACE_INCLUDE_DIRECTORIES)
|
||||
else()
|
||||
message("pybind11 config not found. Fallback to legacy find.")
|
||||
find_package(pybind11)
|
||||
endif()
|
||||
|
||||
if(pybind11_FOUND)
|
||||
message(STATUS "System pybind11 found")
|
||||
message(STATUS "pybind11l include dirs: " ${pybind11_INCLUDE_DIRS})
|
||||
include_directories(SYSTEM ${pybind11_INCLUDE_DIRS})
|
||||
else()
|
||||
message(STATUS "Using third_party/pybind11.")
|
||||
include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../third_party/pybind11/include)
|
||||
endif()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user