Skip to content

Still unable to use xtensor as sub directory #2682

@quinor

Description

@quinor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions