Skip to content

Hide symbols from shared libraries by default and support DLL creation - #122

Merged
ChrisThrasher merged 1 commit into
mainfrom
hide_symbols
Feb 19, 2024
Merged

ChrisThrasher merged 1 commit into
mainfrom
hide_symbols

Conversation

@ChrisThrasher

Copy link
Copy Markdown
Collaborator

https://gcc.gnu.org/wiki/Visibility

Hiding symbols by default from shared libraries has benefits you can read about above. Along with doing this we also ensure that DLLs are supported on Windows and thus make sure we provide 1st class support to all uses irrespective of their platform of choice.

@codecov

codecov Bot commented Feb 15, 2024 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f2f9398) 98.65% compared to head (9dbb767) 98.65%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #122   +/-   ##
=======================================
  Coverage   98.65%   98.65%           
=======================================
  Files          11       11           
  Lines         223      223           
=======================================
  Hits          220      220           
  Misses          3        3           
Flag Coverage Δ
humble 98.65% <ø> (ø)
rolling 98.65% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChrisThrasher

Copy link
Copy Markdown
Collaborator Author

@traversaro Would you mind trying this out to see if it fixes your issues building DLLs? As for CMAKE_RUNTIME_OUTPUT_DIRECTORY I'm unsure if I'll hardcode that into the library but at least for the sake of testing you can specify that as a configuration parameter.

@traversaro

Copy link
Copy Markdown

Just tested on VS2022 with:

mamba create -n rsldev -c conda-forge -c robostack-staging eigen fmt ros-humble-rclcpp ros-humble-tl-expected ros-humble-tcb-span ros-humble-ament-cmake-ros clang-tools range-v3 vs2022_win-64 cmake ninja pkg-config
mamba activate rsldev
cd C:\src
git clone https://github.com/PickNikRobotics/RSL
cd RSL
git checkout hide_symbols
mkdir build
cd build
cmake
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=C:\src\RSL\build\install -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=C:\src\RSL\build\bin -DRSL_BUILD_TESTING:BOOL=ON ..
ninja
ctest

and it works fine.

Comment thread CMakeLists.txt Resolved
@ChrisThrasher
ChrisThrasher merged commit 549df46 into main Feb 19, 2024
@delete-merged-branch
delete-merged-branch Bot deleted the hide_symbols branch February 19, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants