xtensor-blas icon indicating copy to clipboard operation
xtensor-blas copied to clipboard

`find_package(xtensor-blas REQUIRED)` does not expose targets

Open david8dixon opened this issue 5 years ago • 4 comments

How should user consume xtensor-blas? I discovered that there is an xtensor_blas_INCLUDE_DIRS that I can use to populate targets in my library via target_include_dirs but I would prefer to simply use target_link_libraries(mylib <LINKAGE> xtensor_blas).

david8dixon avatar Apr 04 '19 17:04 david8dixon

Indeee it appears that xtensor-blas' cmake is not quite at the same level as the rest of the xtensor stack. We should be exposing targets here. Thanks for the heads up!

SylvainCorlay avatar Apr 05 '19 07:04 SylvainCorlay

One problem is that we probably don't want to specify which BLAS library to link against from the xtensor-blas target. So that the user can easily override it.

wolfv avatar Apr 05 '19 08:04 wolfv

Although exportibg xtensor, xtl, xtensor-blas would probably make sense.

SylvainCorlay avatar Apr 05 '19 08:04 SylvainCorlay

At least add PARENT_SCOPE to set(XTENSOR_BLAS_INCLUDE_DIR ${INCLUDE_DIR}) so the include dirs are exposed

cemoktra avatar Nov 07 '19 14:11 cemoktra