NVIDIA / AMGX

Distributed multigrid linear solver library on GPU
501 stars 143 forks source link

Make shared library, tests and examples optional #308

Open dmikushin opened 6 months ago

dmikushin commented 6 months ago

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.

mattmartineau commented 5 months ago

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