lapack icon indicating copy to clipboard operation
lapack copied to clipboard

CMakeLists.txt doesn't find libs in non standard locations

Open teamblubee opened this issue 7 years ago • 0 comments

Trying to build lapack with cmake and these options

CMAKE_ARGS+=	-DCBLAS=ON 						\
		-DLAPACKE=ON 						\
		-DBUILD_SHARED_LIBS=ON

The build succeeds but linking fails because it cannot find the fortran compiler.

This was a quick patch that I put together to find the files and have the project build successfully.

--- CMakeLists.txt.orig	2018-10-13 20:14:39 UTC
+++ CMakeLists.txt
@@ -10,6 +10,7 @@ set(
   ${LAPACK_MAJOR_VERSION}.${LAPACK_MINOR_VERSION}.${LAPACK_PATCH_VERSION}
   )
 
+LINK_DIRECTORIES(/usr/local/lib /usr/local/flang/lib /usr/local/llvm60/lib)
 # Add the CMake directory for custon CMake modules
 set(CMAKE_MODULE_PATH "${LAPACK_SOURCE_DIR}/CMAKE" ${CMAKE_MODULE_PATH})

Would it be possible to expose a flag to pick up these, they are defined in my LDFLAGS env variables.

teamblubee avatar Oct 13 '18 20:10 teamblubee