Closed tobiasruf closed 5 years ago
One additional suggestion: Would it be an idea to enable the user to "inject" the blas lib with CMake parameters more easily?
We follow the philosophy to build our project incl. 3rd-party libs wit the same compiler version.
My experience with ExternalProject_Add is that it's basically broken to the point of being useless. In particular, it doesn't seem to integrate well, or at all really, with cmake's built in dependency management.
In my experience ExternalProject_Add works well, since it lets you do the common steps (cmake, make, make install) directly from your project with your compiler (important for cross compiling). However, that's another discussion. ;-)
I will try to "inject" my custom OpenBlas library with the standard CMake dlib setup without ExternalProject_Add and report my experience here.
No problem with Dlib and CMake at all. Had some linker issue with non-optimized BLAS symbols coming from another static lib, that we use.
Using my own Openblas build, like shown above, works good.
Intro
Use custom built OpenBlas static lib with dlib as external library in CMake project.
We're build dlib as external project in our CMake project and we would like to build OpenBlas as well as external project due to more flexibility for different platforms and clean build process.
Our current setup looks like that:
find_blas.cmake.in
Expected Behavior
The final build should use the openblas symbols from libopenblas.a.
Current Behavior
The final build does not use the symbols. If I remove the openblas from the LINK_INTERFACE_LIBRARIES I don't get a link error.
NOTE: If I use the standard way with find_blas.cmak the dlib CMake project finds the Mac OS cblas and clapack, but the symbols don't get used, too. I see this when using DNNs which are very slow. In another test project it worked with 19.15., but I wasn't able to reproduce this again for the new project.
Under Ubuntu the above approach seems to work, since I get undefined symbols if remove openblas.
Any ideas what could be the problem?