danfis / libccd

Library for collision detection between two convex shapes
Other
478 stars 108 forks source link

C visibility support #39

Closed j-rivero closed 6 years ago

j-rivero commented 6 years ago

This PR implements the control of binary symbols visibility in libccd.

The PR uses the cmake GenerateExportsHeader to provide the needed export header and change the visibility name to CCD_EXPORT.

The PR also adds the CCD_HIDE_ALL_SYMBOLS option (OFF by the default). This option covers a use case we found in Drake where a software uses ccd (linked statically) but does not expose it in the public API (headers). In this scenario the best option to avoid any possible conflict with other versions of fcl is to hide all the symbols from the public ABI.

I've tested this PR against the current fcl mastert branch.

j-rivero commented 6 years ago

Looks like Travis supports not only the use of cmake but also the use of autotools and makefiles. Should I adapt the PR to work also with autotools or it is consider as a deprecated build system for libccd?

danfis commented 6 years ago

Thanks for the patch.

Regarding the autotools, I am not sure, but I think some people still use it, so I would rather keep it.