Bug#1114486: cmake can't detect libarmadillo-dev

刘 志鹏 silent_missile at msn.com
Sat Sep 6 03:31:37 BST 2025


Package: libarmadillo-dev
Version: 14.2.3+dfsg-1


I am using Debian-13 trixie.

here is a minimal sample

CMakeLists.txt

'''
cmake_minimum_required(VERSION 3.15)
set(APP_NAME armatest)
project(${APP_NAME})
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

# https://cmake.org/cmake/help/latest/module/FindArmadillo.html
find_package(Armadillo CONFIG REQUIRED)
target_include_directories(armatest PRIVATE ${ARMADILLO_INCLUDE_DIRS})
target_link_libraries(armatest PRIVATE ${ARMADILLO_LIBRARIES} openblas)
add_executable(armatest armatest.cpp)
'''

armatest.cpp
'''
#include <armadillo>
#include <iostream>

int main() {
  arma::Mat<double> mat = arma : Mat<double>(4, 4, arma::randu);
  std::cout << mat;
}
'''

put CMakeLists.txt and armatest.cpp in the same folder, run cmake

then cmake would report Armadillo_CONFIG.cmake not found

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20250906/190d944f/attachment-0001.htm>


More information about the debian-science-maintainers mailing list