Skip to content

Commit

Permalink
python: Set -fvisibility-inlines-hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisv committed Oct 24, 2024
1 parent 6b8ff4d commit dbf2974
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bindings/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ function(PINOCCHIO_PYTHON_BINDINGS_SPECIFIC_TYPE scalar_name)
endif()
add_dependencies(${PROJECT_NAME}-python ${PYTHON_LIB_NAME})

# Remove lib prefix for the target and use the right define for DLLAPI definition
set_target_properties(${PYTHON_LIB_NAME} PROPERTIES PREFIX "" DEFINE_SYMBOL "${PYWRAP}_EXPORTS")
# Remove lib prefix for the target and use the right define for DLLAPI definition.
#
# Set inlined function visibility to hidden by default. This avoid bug on OSX where two symbol
# from two different binding (`pinocchio::python::exposeSpecificTypeFeatures`) can be wrongly
# loaded (see https://github.com/stack-of-tasks/pinocchio/issues/2462).
set_target_properties(
${PYTHON_LIB_NAME}
PROPERTIES PREFIX ""
DEFINE_SYMBOL "${PYWRAP}_EXPORTS"
VISIBILITY_INLINES_HIDDEN ON)

# Do not report:
#
Expand Down

0 comments on commit dbf2974

Please sign in to comment.