Modernize declaration of compile options

This commit is contained in:
Robert Haschke 2025-08-07 11:47:35 +02:00
parent 5ec63045e8
commit 580dac9151
3 changed files with 3 additions and 4 deletions

View File

@ -39,7 +39,7 @@ catkin_package(
CFG_EXTRAS pybind11.cmake
)
add_compile_options(-fvisibility-inlines-hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN TRUE)
set(PROJECT_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/include/moveit/task_constructor)

View File

@ -3,9 +3,6 @@
# pybind11 must use the ROS python version
set(PYBIND11_PYTHON_VERSION ${PYTHON_VERSION})
# 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

View File

@ -4,6 +4,8 @@ add_library(${PROJECT_NAME}_python_tools SHARED
src/properties.cpp
)
target_link_libraries(${PROJECT_NAME}_python_tools PUBLIC ${PROJECT_NAME} pybind11::pybind11)
# Use minimum-size optimization for pybind11 bindings
target_link_libraries(${PROJECT_NAME}_python_tools PUBLIC pybind11::opt_size)
# catkin_lint cannot detect target declarations in functions, here in pybind11_add_module
#catkin_lint: ignore undefined_target