[CMake] FindBlas and header file "blas.h"

Tim Gallagher tim.gallagher at gatech.edu
Fri Mar 1 12:43:30 EST 2013


Have you installed the development package for blas and lapack? Typically distributions have a library-only package and then a development package that includes the headers. Check for libblas-dev in Ubuntu.

Tim

----- Original Message -----
From: "Nicholas Kinar" <n.kinar at usask.ca>
To: cmake at cmake.org
Sent: Friday, March 1, 2013 11:50:06 AM
Subject: [CMake] FindBlas and header file "blas.h"

Hello,

On Ubuntu 12.04, I am compiling some third-party program code that 
#includes the BLAS header file "blas.h".  Although Cmake does find the 
BLAS and LAPACK libraries, I receive the following gcc compiler error:

fatal error: blas.h: No such file or directory

I've tried to change this include to  other files such as "lapacke.h" 
but the include file is still not found.  What I am doing wrong here?  
My Cmake file is reproduced below.

Nicholas

#################################################
cmake_minimum_required (VERSION 2.6)
project (stretch-test)

find_package( BLAS REQUIRED )
find_package( LAPACK REQUIRED )

set(CMAKE_C_FLAGS "-std=c99")

include_directories(${BLAS_INCLUDE_DIR} ${LAPACK_INCLUDE_DIR})

add_executable( stest
main.c)
# also link with C math library
TARGET_LINK_LIBRARIES(stest m blas ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
--

Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list