You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can easily find instructions on how to build blaspp, and succeeded in doing so. However, how to reference it in another CMake-managed project does not appear to be documented.
I have resorted to the following technique to see what CMake variables are defined after a successful find_package(blaspp REQUIRED):
cmake_minimum_required (VERSION 3.25.0)
project(try_blaspp)
get_directory_property(_vars_before VARIABLES)
find_package(blaspp REQUIRED)
get_directory_property(_vars VARIABLES)
list(REMOVE_ITEM _vars _vars_before ${_vars_before})
foreach(_var IN LISTS _vars)
message(STATUS "${_var} = ${${_var}}")
endforeach()
add_executable(run main.cpp)
# This line will fail:
#target_include_directories(run PRIVATE ${blaspp_INCLUDE_DIRS})
yet blaspp_INCLUDE_DIRS does not appear to be defined, and hence the compile step fails:
main.cpp:3:10: fatal error: 'blas.hh' file not found
#include <blas.hh>
^~~~~~~~~
1 error generated.
If I hardcode the path to the blas include dir, I fail to link, necessitating hard coded path to the blas library, which again I cannot see in the defined CMake variables:
Thanks for the feedback. We will add documentation on how to integrate BLAS++ into an application. However, I don't understand the issue that you are having. It seems to be too complicated. Simply doing this works in the example directory:
I can easily find instructions on how to build blaspp, and succeeded in doing so. However, how to reference it in another CMake-managed project does not appear to be documented.
I have resorted to the following technique to see what CMake variables are defined after a successful
find_package(blaspp REQUIRED)
:This prints:
I expected that one of these CMake variables should be set to
/opt/slate/include
, so that I can write (say)yet
blaspp_INCLUDE_DIRS
does not appear to be defined, and hence the compile step fails:If I hardcode the path to the blas include dir, I fail to link, necessitating hard coded path to the blas library, which again I cannot see in the defined CMake variables:
The text was updated successfully, but these errors were encountered: