Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add STLAB_BUILD_LIBRARY CMake option to build a library #556

Merged
merged 5 commits into from
Feb 27, 2025

Conversation

gbottesi
Copy link
Contributor

Add a CMAKE option to be able to build a library with functions containing local static variables and avoid double definition of them when compiling shared libraries

Guillaume BOTTESI and others added 2 commits February 19, 2025 06:46
Since we have moved to CMake I'm fine with moving away from a header only library so I removed the header-only option.

I declared pre_exit and at_pre_exit as extern "C" to make them simpler to export from a DLL in an export list.

I will open an issue to do a similar thing for the default executor, that is a bit more difficult pull because of late type erasure.
@sean-parent
Copy link
Member

I removed the option for building header-only (it is now always building the .cpp files) to keep the build matrix simple.

The pre_exit operations are extern "C" to make them simpler to add to an export list. I'll look to do something simlar for the default executor in another PR - that is more difficult because of the late type erasure.

Copy link
Contributor Author

@gbottesi gbottesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. thx

@sean-parent sean-parent merged commit 02512bc into stlab:main Feb 27, 2025
6 checks passed
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.

2 participants