Migrate dlib/cmake_utils/find_blas.cmake to FindBLAS
Main idea
Can we use CMake module FindBLAS instead of find_blas.cmake. Prior blocker was support for cmake <= 3.17 but that seems to be no longer an issue after migration to FindCudaToolkit, see #2833.
Anything else?
Yeah, if you want to send me a PR for it that would be great :D
It does need to continue to be as capable as the existing find blas cmake code though. I haven't used the new FindBLAS, so I don't know if it's covering as much ground. But for instance, the current script we have handles matlab integration and finding blas on windows. It would not surprise me if those use cases were ignored (or largely ignored to the point that users perceive that it doesn't cater to those use cases by default) by the built in FindBLAS.
Had a preliminary look.
CMake has a Matlab module but unfortunately I do not have Matlab so would not be able to test.
The first consideration is whether we can bump the minimum cmake version to 3.17, preferably 3.22?
This depends on the user base. In scientific computing, systems sometimes have very old binaries in order to replicate results.
Perhaps we have reached the point where we might consider branching the codebase creating a dlib-legacy and dlib-next.
Yeah I don't want to up the cmake version. 3.17 is already new enough that I would expect it to be a bother to some users. Definitely not branching the codebase :)
We update stuff like that after enough time has passed for most users to have reasonably updated. There is a long latency for people to update things like compilers and other related build tools though. More importantly, it's the job of tools like dlib to be easy for their users to use in all the contexts they want to use it. Unless there is some specific problem for a lager bulk of that is solved by updating some dependency then it shouldn't be updated (e.g. a new version of cmake came out that doesn't work with dlib and now more people are using that new version than are stuck on the old version we want to drop).