Build python bindings with size optimization

This commit is contained in:
Robert Haschke 2022-12-11 09:36:22 +01:00
parent 4886fc3f7b
commit 341f1838b5

View File

@ -1,10 +1,11 @@
# As we rely on some not yet released pybind11 PRs, we are employing
# our own fork of it, imported via git submodule.
# See https://github.com/pybind/pybind11/pull/2687.
# We rely on pybind11's smart_holder branch imported pybind11 via git submodule
# pybind11 must use the ROS python version
set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION_STRING})
# Use minimum-size optimization for pybind11 bindings
add_compile_options("-Os")
# create symlink to grant access to downstream packages in devel space
add_custom_target(pybind11_devel_symlink ALL COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_SOURCE_DIR}/pybind11