Closed anntzer closed 3 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?
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...
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 aslibcminpacks.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)?