Unverified Commit e5d5d809 authored by bmanga's avatar bmanga Committed by GitHub
Browse files

[cmake]Propagate WITH_CUDA macro to target consumers (#1855)

parent e2573a71
...@@ -33,5 +33,9 @@ find_package(pybind11 REQUIRED) ...@@ -33,5 +33,9 @@ find_package(pybind11 REQUIRED)
endif() endif()
target_link_libraries(TorchVision::TorchVision INTERFACE ${TORCH_LIBRARIES} pybind11::pybind11) target_link_libraries(TorchVision::TorchVision INTERFACE ${TORCH_LIBRARIES} pybind11::pybind11)
if(@WITH_CUDA@)
target_compile_definitions(TorchVision::TorchVision INTERFACE WITH_CUDA)
endif()
endif() endif()
endif() endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment