[CMake] False.lib error while linking
Bill Hoffman
bill.hoffman at kitware.com
Thu Jun 2 16:08:18 EDT 2011
On 6/1/2011 6:11 AM, AMARNATH, Balachandar wrote:
> Dear Bill,
> When i did cmake --trace, I could see at some places BLAS_LIBRARIES are
> set to FALSE. Particularly, here in below lines
> *******************************
...
> c:/Users/BAAMARNA5617/Programs/CMake
> 2.8/share/cmake-2.8/Modules/FindBLAS.cmake(114): if(NOT _libraries_work )
> *c:/Users/BAAMARNA5617/Programs/CMake
> 2.8/share/cmake-2.8/Modules/FindBLAS.cmake(115): set(BLAS_LIBRARIES FALSE )*
> c:/Users/BAAMARNA5617/Programs/CMake
> 2.8/share/cmake-2.8/Modules/FindBLAS.cmake(401): if(NOT BLAS_LIBRARIES )
> c:/Users/BAAMARNA5617/Programs/CMake
> 2.8/share/cmake-2.8/Modules/FindBLAS.cmake(402):
> check_fortran_libraries(BLAS_LIBRARIES BLAS sgemm mkl;guide
> ${CMAKE_THREAD_LIBS_INIT};${LM} )
> **********************************************************
> This, I believe, due to missing of libguide40 library which is required
> by FindBLAS.cmake module. Because of this, LAPACK_LIBRARIES are also set
> to FALSE. They are linked to 'mpf' library through
> target_link_libraries(${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ...). By the
> way, i use Intel MKL for blas and lapack libraries.
> Regards
> Balachandar
So, your code should check the results of FindBLAS before using the
variables. You could create a copy of FindBLAS.cmake specific to your
project. If you have patches for the file I would look at them as well.
You could also email the module maintainer for FindBLAS.cmake for help:
http://www.itk.org/Wiki/CMake:Module_Maintainers
-Bill
More information about the CMake
mailing list