Skip to content

Commit 6c9f2ea

Browse files
committed
metatomic-torch does need to directly link to the metatensor target
1 parent e2d98d9 commit 6c9f2ea

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

metatomic-torch/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ if (TARGET metatensor_torch)
8585
check_compatible_versions(${METATENSOR_TORCH_BUILD_VERSION} ${REQUIRED_METATENSOR_TORCH_VERSION})
8686
else()
8787
find_package(metatensor_torch ${REQUIRED_METATENSOR_TORCH_VERSION} CONFIG REQUIRED)
88-
# No version specification here, we'll use whatever `metatensor_torch` uses
89-
find_package(metatensor CONFIG REQUIRED)
9088
endif()
9189

9290
# FindCUDNN.cmake distributed with PyTorch is a bit broken, so we have a
@@ -118,7 +116,7 @@ set_target_properties(metatomic_torch PROPERTIES
118116
BUILD_VERSION ${METATOMIC_TORCH_FULL_VERSION}
119117
)
120118

121-
target_link_libraries(metatomic_torch PUBLIC torch metatensor_torch metatensor ${CMAKE_DL_LIBS})
119+
target_link_libraries(metatomic_torch PUBLIC torch metatensor_torch ${CMAKE_DL_LIBS})
122120
target_compile_features(metatomic_torch PUBLIC cxx_std_17)
123121
target_include_directories(metatomic_torch PUBLIC
124122
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>

0 commit comments

Comments
 (0)