From 341f1838b583f9420dde7cff471191958f03df68 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Sun, 11 Dec 2022 09:36:22 +0100 Subject: [PATCH] Build python bindings with size optimization --- core/python/CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/python/CMakeLists.txt b/core/python/CMakeLists.txt index 61c81cd7..cf877722 100644 --- a/core/python/CMakeLists.txt +++ b/core/python/CMakeLists.txt @@ -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