mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-27 07:32:02 +00:00
Merge branch 'pybind:master' into master
This commit is contained in:
commit
bdc66adad4
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -667,7 +667,7 @@ jobs:
|
|||||||
|
|
||||||
|
|
||||||
# This verifies that the documentation is not horribly broken, and does a
|
# This verifies that the documentation is not horribly broken, and does a
|
||||||
# basic sanity check on the SDist.
|
# basic validation check on the SDist.
|
||||||
doxygen:
|
doxygen:
|
||||||
name: "Documentation build test"
|
name: "Documentation build test"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -87,7 +87,7 @@ buffer objects (e.g. a NumPy matrix).
|
|||||||
/* Request a buffer descriptor from Python */
|
/* Request a buffer descriptor from Python */
|
||||||
py::buffer_info info = b.request();
|
py::buffer_info info = b.request();
|
||||||
|
|
||||||
/* Some sanity checks ... */
|
/* Some basic validation checks ... */
|
||||||
if (info.format != py::format_descriptor<Scalar>::format())
|
if (info.format != py::format_descriptor<Scalar>::format())
|
||||||
throw std::runtime_error("Incompatible format: expected a double array!");
|
throw std::runtime_error("Incompatible format: expected a double array!");
|
||||||
|
|
||||||
|
@ -505,7 +505,10 @@ You can use these targets to build complex applications. For example, the
|
|||||||
target_link_libraries(example PRIVATE pybind11::module pybind11::lto pybind11::windows_extras)
|
target_link_libraries(example PRIVATE pybind11::module pybind11::lto pybind11::windows_extras)
|
||||||
|
|
||||||
pybind11_extension(example)
|
pybind11_extension(example)
|
||||||
pybind11_strip(example)
|
if(NOT MSVC AND NOT ${CMAKE_BUILD_TYPE} MATCHES Debug|RelWithDebInfo)
|
||||||
|
# Strip unnecessary sections of the binary on Linux/macOS
|
||||||
|
pybind11_strip(example)
|
||||||
|
endif()
|
||||||
|
|
||||||
set_target_properties(example PROPERTIES CXX_VISIBILITY_PRESET "hidden"
|
set_target_properties(example PROPERTIES CXX_VISIBILITY_PRESET "hidden"
|
||||||
CUDA_VISIBILITY_PRESET "hidden")
|
CUDA_VISIBILITY_PRESET "hidden")
|
||||||
|
Loading…
Reference in New Issue
Block a user