devernay / cminpack

A C/C++ rewrite of the MINPACK software (originally in FORTRAN) for solving nonlinear equations and nonlinear least squares problems
http://devernay.free.fr/hacks/cminpack/
145 stars 63 forks source link

Please consider suggesting an "official" suffix for single-precision builds #41

Closed anntzer closed 3 years ago

anntzer commented 4 years ago

Currently, double-precision and single-precision builds default to sharing the same library name. As a consequence, downstream packagers (linux, conda) typically just package the double-precision version, and the single precision version is unavailable. In fact, it is not that difficult to provide both single and double precisions in e.g. a linux package; the single-precision library can simply use a separate name, and this is readily achieved with e.g. cmake ... -DBUILD_SHARED_LIBS=ON -DCMAKE_C_FLAGS=-D__cminpack_float__ -DCMAKE_RELEASE_POSTFIX=s which builds the single precision shared lib as libcminpacks.so (the "s" suffix being the one suggested in https://www.math.utah.edu/software/minpack.html#linking-local too). Would you be willing to declare "officially" that it is preferred that downstream packagers provide both single and double precision versions of the library, with the single-precision using the "s" suffix (for example)?

devernay commented 4 years ago

Sure! It would even be greater if the default cmake build could build both versions at the same time. Do you think it's possible?

anntzer commented 4 years ago

Unfortunately, my cmake-fu is very weak (it already took me longer than I care to admit to figure out the correct invocation above) so I have no idea whether this is possible...