find_package(BLAS) fails to find Arm performance libraries

I have just downloaded and installed latest APL (24.04) on my windows on arm device. I am currently just making some small tests, but cmake fails to find apl. To reproduce, here is my CMakeLists file:

cmake_minimum_required(VERSION 3.18)
project(DUMMYAPL)
set(BLA_VENDOR Arm)
find_package(BLAS)
add_executable(main main.cpp)
if (BLAS_FOUND)
target_include_directories(main PRVATE ${BLAS_INCLUDE_LIBRARIES})
target_link_libraries(main PRVATE ${BLAS_LIBRARIES})
else()
message(FATAL_ERROR “APL NOT FOUND”)
endif()

and this is my main.cpp file:

#include <iostream>
#include “armpl.h”

int main() {
std::cout << “Success” << std::endl;
return 0;

}

It fails with this error: – Could NOT find BLAS (missing: BLAS_LIBRARIES)
When I try a similar approach on my windows intel device( I just replace armpl.h with mkl.h and the BLA_VENDOR with Intel10_64lp), it works. Does someone know why this ight be happening ?

Parents
  • Hi Alin Pahontu,

    Unfortunately find_package(BLAS) for Arm PL isn't supported on Windows yet. CMake itself will need to be updated.

    In the meantime, you could try to add the following to your CMakeLists.txt file to let CMake know about Arm PL on Windows:

    cmake_minimum_required(VERSION 3.19)
    project(DUMMYAPL)
    
    set(ARMPL_ROOT "C:/Program Files/Arm Performance Libraries/armpl_24.04")
    
    add_library(armpl SHARED IMPORTED GLOBAL)
    set_property(TARGET armpl PROPERTY IMPORTED_LOCATION
                 ${ARMPL_ROOT}/lib/armpl_lp64.dll.lib)
    set_property(TARGET armpl PROPERTY IMPORTED_IMPLIB
                 ${ARMPL_ROOT}/lib/armpl_lp64.lib)
    set_property(TARGET armpl PROPERTY INTERFACE_INCLUDE_DIRECTORIES
                 ${ARMPL_ROOT}/include)
    
    add_executable(main main.cpp)
    
    target_link_libraries(main PRIVATE armpl)

    Kevin

Reply
  • Hi Alin Pahontu,

    Unfortunately find_package(BLAS) for Arm PL isn't supported on Windows yet. CMake itself will need to be updated.

    In the meantime, you could try to add the following to your CMakeLists.txt file to let CMake know about Arm PL on Windows:

    cmake_minimum_required(VERSION 3.19)
    project(DUMMYAPL)
    
    set(ARMPL_ROOT "C:/Program Files/Arm Performance Libraries/armpl_24.04")
    
    add_library(armpl SHARED IMPORTED GLOBAL)
    set_property(TARGET armpl PROPERTY IMPORTED_LOCATION
                 ${ARMPL_ROOT}/lib/armpl_lp64.dll.lib)
    set_property(TARGET armpl PROPERTY IMPORTED_IMPLIB
                 ${ARMPL_ROOT}/lib/armpl_lp64.lib)
    set_property(TARGET armpl PROPERTY INTERFACE_INCLUDE_DIRECTORIES
                 ${ARMPL_ROOT}/include)
    
    add_executable(main main.cpp)
    
    target_link_libraries(main PRIVATE armpl)

    Kevin

Children