AMGX icon indicating copy to clipboard operation
AMGX copied to clipboard

Make shared library, tests and examples optional

Open dmikushin opened this issue 1 year ago • 1 comments

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 avatar May 29 '24 23:05 dmikushin

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

mattmartineau avatar Jun 05 '24 23:06 mattmartineau