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

Make shared library, tests and examples optional #308

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dmikushin
Copy link
Contributor

@dmikushin dmikushin commented May 29, 2024

Make AMGX shared library (amgxsh) building optional for the following good reasons:

  1. All CMake projects are generally encouraged to support BUILD_SHARED_LIBS option, it is often found in the state-of-art opensource software
  2. We want to link AMGX statically, in order to have only what we need in the application binary
  3. AMGX shared library throws "relocation truncated to fit" errors upon linking in Debug mode

Furthermore, adding AMGX_WITH_TESTS and AMGX_WITH_EXAMPLES options to disable examples and tests, e.g. for production builds.

By default, the previous build behavior is preserved.

dmikushin added 2 commits May 30, 2024 08:07
for the following good reasons:

0. All CMake projects are generally encouraged to support BUILD_SHARED_LIBS option, it is often found
in the state-of-art opensource software
1. We want to link AMGX statically, in order to have only what we need in the application binary
2. AMGX shared library throws "relocation truncated to fit" errors upon linking in Debug mode
@mattmartineau
Copy link
Collaborator

This looks good, thanks. Give me a short while to pass it through our tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants