Closed emmenlau closed 4 years ago
Thanks!
Python and other language interfaces rely on shared library, and we don't use static library yet. There is no other reason.
Adding this option is reasonable, but can we build the shared library by default? Otherwise I need to update the documents and building scripts.
Python and other language interfaces rely on shared library, and we don't use static library yet.
Ok that is good to know, thanks! I'm using the static build on Linux and macOS from C++ and it works well so far.
Adding this option is reasonable, but can we build the shared library by default? Otherwise I need to update the documents and building scripts.
I'm not 100% certain about the default for BUILD_SHARED_LIBS
. To be completely certain, I will add another small PR that sets a default that users can override.
This PR removes the explicit setting of
SHARED
for the library. Instead, users can select whether they want shared or static builds with the standard cmake option-DBUILD_SHARED_LIBS=(ON|OFF)
, see https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.htmlWe tested thundersvm static successfully against CUDA 10.2 on Ubuntu and CentOS Linux and on Visual Studio 2017 and 2019.
Os is there a reason static can not be used?