i刚刚创建了一个三行cmakelists.txt,如测试目录下面没有任何文件。我尝试了导出lib路径等,但没有任何基本技巧可行。如何使这项工作?
cmake_minimum_required(VERSION 3.6 FATAL_ERROR)
project(test CXX)
find_package(BLAS REQUIRED)
并将其作为并收到以下错误。
ramki@hostname:~/temp>CC=CC CXX=CC cmake ../nmflibrary/test/
-- The CXX compiler identification is GNU 6.3.0
-- Cray Programming Environment 2.5.13 CXX
-- Check for working CXX compiler: /opt/cray/craype/2.5.13/bin/CC
-- Check for working CXX compiler: /opt/cray/craype/2.5.13/bin/CC -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
CMake Error at /autofs/nccs-svm1_sw/titan/.swci/0-login/opt/spack/20170612/linux-suse_linux11-x86_64/gcc-4.3.4/cmake-3.9.0-owxiriblogovogl5zbrg45ulm3ln34cx/share/cmake-3.9/Modules/FindBLAS.cmake:699 (message):
A required library with BLAS API not found. Please specify library
location.
Call Stack (most recent call first):
CMakeLists.txt:6 (find_package)
-- Configuring incomplete, errors occurred!
See also "/ccs/home/ramki/temp/CMakeFiles/CMakeOutput.log".
See also "/ccs/home/ramki/temp/CMakeFiles/CMakeError.log".
如何在cray包装纸上使用Blas进行Find_package?
cray编译器隐式链接blas和lapack库,因此通常在命令行上不给出它们。检测到这种情况的能力已添加到Blas的Cmake 3.13.0中,并将添加到Cmake 3.16.0的Lapack中。
因此,如果您只能使用Blas,请下载较新的Cmake二进制tarball。