Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect BLAS/LAPACK vendors using CMake

Tags:

cmake

lapack

blas

So my code wants to include different header files when occurs to different BLAS/LAPACK vendors. Are there any predefined macros or something like that make me check it?

like image 750
xis Avatar asked Jun 04 '11 18:06

xis


1 Answers

CMake 2.8+ ships with FindBLAS.cmake FindLAPACK.cmake. You may want to review the comments in the files from your local cmake install: cmake-2.8.5/share/cmake/Modules/FindBLAS.cmake. This module supports a variety of BLAS and LAPACK implementations. For example:

set( ENV{BLA_VENDOR} "ATLAS" )
find_package( BLAS REQUIRED )

Good luck.

like image 108
Kelly Avatar answered Nov 17 '22 20:11

Kelly