Skip to content
Open
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
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -381,15 +381,15 @@ if (MATX_EN_FILEIO OR MATX_EN_VISUALIZATION OR MATX_EN_PYBIND11 OR MATX_BUILD_EX
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
find_package(pybind11 REQUIRED)

# Export pybind11 dependency for downstream users after make install
rapids_export_package(INSTALL pybind11 matx-exports GLOBAL_TARGETS pybind11::embed pybind11::pybind11)
rapids_export_package(BUILD pybind11 matx-exports GLOBAL_TARGETS pybind11::embed pybind11::pybind11)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace at end of line

Suggested change
rapids_export_package(BUILD pybind11 matx-exports GLOBAL_TARGETS pybind11::embed pybind11::pybind11)
rapids_export_package(BUILD pybind11 matx-exports GLOBAL_TARGETS pybind11::embed pybind11::pybind11)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


# Check for python libs
include(cmake/CheckPythonLibs.cmake)
check_python_libs("numpy")
check_optional_python_libs("cupy")

# Required by pybind
# https://pybind11.readthedocs.io/en/stable/faq.html#someclass-declared-with-greater-
# visibility-than-the-type-of-its-field-someclass-member-wattributes
target_compile_options(matx INTERFACE -fvisibility=hidden)
target_link_libraries(matx INTERFACE pybind11::embed)

# Visualization requires Python libraries
Expand Down
5 changes: 5 additions & 0 deletions cmake/GetPyBind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
# // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# /////////////////////////////////////////////////////////////////////////////////
function(find_and_configure_pybind11)
# Enable pybind11 installation when fetched via CPM
# This ensures pybind11 headers and cmake config are installed with matx
set(PYBIND11_INSTALL ON CACHE BOOL "Install pybind11 headers and cmake config")
set(PYBIND11_FINDPYTHON ON CACHE BOOL "Use FindPython for pybind11")

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trailing whitespace on empty line

Suggested change

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

CPMFindPackage(NAME pybind11
GIT_REPOSITORY https://github.com/pybind/pybind11.git
GIT_TAG a5b9e50)
Expand Down