Giter VIP home page Giter VIP logo

Comments (8)

juliangaal avatar juliangaal commented on May 20, 2024 1

great, thanks! Updated my file

from xtensor-blas.

wolfv avatar wolfv commented on May 20, 2024

Hi Julian,

have you tried find_package(xtensor-blas REQUIRED)? It should work.

Then you get the standard xtensor_blas_INCLUDE_DIRS and xtensor_blas_LIBRARIES (the latter one is unset!).

from xtensor-blas.

wolfv avatar wolfv commented on May 20, 2024

closing for now. we just fixed some remaining cmake issues. let us know if you still have issues (& feel free to reopen! :)

from xtensor-blas.

juliangaal avatar juliangaal commented on May 20, 2024

Ah, I always tried find_package(XTENSOR_BLAS ...) or find_package(XTENSOR-BLAS ...) due to xtensor using find_package(XTENSOR). Maybe for consistency, may I suggest, changing it to "XTENSOR-BLAS" in the future?

from xtensor-blas.

wolfv avatar wolfv commented on May 20, 2024

hmm, to be honest, I think even for xtensor everything should be lowercase

find_package(xtensor), include_directories(${xtensor_INCLUDE_DIR}) :)

from xtensor-blas.

juliangaal avatar juliangaal commented on May 20, 2024

My CMakeLists.txt

project(KALMANCPP)

cmake_minimum_required(VERSION 3.1)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g -W")

find_package(XTENSOR REQUIRED)
find_package(xtensor-blas REQUIRED)
find_package(BLAS REQUIRED)
find_package(LAPACK REQUIRED)

include_directories(include)

add_executable(kalman2d src/Kalman2d.cpp)
target_link_libraries(kalman2d lapack blas)

works flawlessly! However, all packages are still found when I use find_package(all_lower_case). I thought cmake is case sensitive. Oh well, thanks anyways! Learned something again

from xtensor-blas.

wolfv avatar wolfv commented on May 20, 2024

sooooo you're actually not really using cmake here :)

you should add include_directories(${xtensor_INCLUDE_DIRS} ${xtensor_blas_INCLUDE_DIRS}) as well as when linking, link like that: target_link_libraries(kalman2d ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES}) otherwise you're not using what you get from find_package.

Also you can check out what these variables contain by using message("BLAS: ${BLAS_LIBRARIES}") which i find helpful for debugging

from xtensor-blas.

wolfv avatar wolfv commented on May 20, 2024

note the reason why it works right now, is that you install xtensor & xtensor-blas into your system standard include path, therefore it's picked up.
And for BLAS & LAPACK, you probably have these libraries installed into the standard library path which is why it works. But by just doing target_link_libraries(kalman2d blas lapack) you only emit -llapack -lblas on the command line which doesn't fully qualify which BLAS and lapack lib and can definitly also differ from what you find with cmake.

from xtensor-blas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.