Skip to content

Commit

Permalink
Making xtensor::xsimd optional based on availability
Browse files Browse the repository at this point in the history
  • Loading branch information
tdegeus authored and JohanMabille committed Dec 8, 2019
1 parent 3e1890c commit 30b8233
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xtensorConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ if(NOT TARGET xtensor::optimize)
endif()

if(NOT TARGET xtensor::xsimd)
add_library(xtensor::xsimd INTERFACE IMPORTED)
find_dependency(xsimd @xsimd_REQUIRED_VERSION@)
target_link_libraries(xtensor::xsimd INTERFACE xsimd)
target_compile_definitions(xtensor::xsimd INTERFACE XTENSOR_USE_XSIMD)
find_dependency(xsimd @xsimd_REQUIRED_VERSION@ QUIET)
if (xsimd_FOUND)
add_library(xtensor::xsimd INTERFACE IMPORTED)
target_link_libraries(xtensor::xsimd INTERFACE xsimd)
target_compile_definitions(xtensor::xsimd INTERFACE XTENSOR_USE_XSIMD)
endif()
endif()

0 comments on commit 30b8233

Please sign in to comment.