NVIDIA / AMGX

Distributed multigrid linear solver library on GPU
468 stars 136 forks source link

Make shared library, tests and examples optional #308

Open dmikushin opened 1 month ago

dmikushin commented 1 month 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 1 month ago

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