xtensor icon indicating copy to clipboard operation
xtensor copied to clipboard

Still unable to use xtensor as sub directory

Open quinor opened this issue 1 year ago • 4 comments

I'm not sure what was the status when #1692 was resolved, but currently:

set(XTENSOR_USE_XSIMD "" CACHE BOOL ON)

add_subdirectory(xtl)
add_subdirectory(xsimd)
add_subdirectory(xtensor)

(...)

add_library(foo)
target_link_libraries(xtensor xtensor::optimize xtensor::use_simd)

fails with:

  Target "foo" links to:

    xtensor::optimize

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

From what I understood, the xtensorConfig.cmake.in contains some stuff that add_subdirectory doesn't receive as compared to find_package.

quinor avatar Apr 08 '23 22:04 quinor

(I think that a bunch more stuff just doesn't work when the xtensorConfig.cmake is not active - like TBB integration)

quinor avatar Apr 08 '23 23:04 quinor

A priori this is not something we support. If this is something that is important to you please consider a PR!

tdegeus avatar Apr 11 '23 08:04 tdegeus

I'll definitely do if I manage to fix it :)

quinor avatar Apr 11 '23 08:04 quinor

I think mostly that we 'configure' actually almost nothing. As such the .in extension that seems to be causing you problems is misleading and can be removed. But there may be one or two details that need to be fixed

tdegeus avatar Apr 11 '23 09:04 tdegeus