2015-07-22 14:24 GMT+02:00 Cedric Doucet <cedric.dou...@inria.fr>: > > Hello, > > I try to use the find_package function to find BLAS and LAPACK libraries > which are required in my code. > > To do that, I do the following: > > ====================== > FIND_PACKAGE(BLAS) > FIND_PACKAGE(LAPACK) > > # I should test with BLAS_FOUND and LAPACK_FOUND here but that's not the > problem > LIST(GET BLAS_LIBRARIES 0 BLAS_LIB) > LIST(GET LAPACK_LIBRARIES 0 LAPACK_LIB) > > TARGET_LINK_LIBRARY(myexe ${LAPACK_LIB}$ ${BLAS_LIB}$) >
You have extraneous '$' at the end of your variables reference ${LAPACK_LIB}$ should be ${LAPACK_LIB} > ======================= > > I have manually checked that BLAS and LAPACK are actually found. > As explained in FindBLAS.cmake and Find.LAPACK.cmake, BLAS_LIBRARIES and > LAPACK_LIBRARIES are lists containing paths to these libraries. > I get the first entry in each of these lists and try to link with these > entries (/usr/lib/libf77blas.so, /usr/lib/liblapack.so). > But I obtain the following error message: > > ================================================== > > g++: error: /usr/lib/liblapack.so$: No such file or directory > g++: error: /usr/lib/libf77blas.so$: No such file or directory > > ================================================== > so g++ is indeed right, look at the dollar sign at the end of .so files. > > But these files exist in my computer. > > > Do you know where the problem come from? > > > Cheers, > > > Cédric > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > http://public.kitware.com/mailman/listinfo/cmake > -- Eric
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake