Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake faied #3

Closed
Vincent630 opened this issue Aug 1, 2019 · 4 comments
Closed

cmake faied #3

Vincent630 opened this issue Aug 1, 2019 · 4 comments

Comments

@Vincent630
Copy link

it seems you reference the lib of libtorch and that makes this error ,but i am not sure how to fix this issue ,can you give me some help about this and i wil appreciate it.
CMake Error at /home/suning/libtorch/share/cmake/Caffe2/public/utils.cmake:16 (add_library):
add_library cannot create target "torch_library" because another target
with the same name already exists. The existing target is an interface
library created in source directory
"/home/suning/libtorch-yolov3-deepsort-master/detection". See
documentation for policy CMP0002 for more details.

@LevineYang
Copy link

it seems you reference the lib of libtorch and that makes this error ,but i am not sure how to fix this issue ,can you give me some help about this and i wil appreciate it.
CMake Error at /home/suning/libtorch/share/cmake/Caffe2/public/utils.cmake:16 (add_library):
add_library cannot create target "torch_library" because another target
with the same name already exists. The existing target is an interface
library created in source directory
"/home/suning/libtorch-yolov3-deepsort-master/detection". See
documentation for policy CMP0002 for more details.

Hi Vincent630, did you solve this error? I run into the same problem... please help, thank you

@intjun
Copy link

intjun commented Jan 8, 2020

if (NOT TARGET ${DST})
add_library(${DST} INTERFACE)
endif()

@CalvinPaean
Copy link

Go to the following directory in libtorch you installed, "libtorch/share/cmake/Caffe2/public".

Open "utils.cmake", on line #16, change that line to

if (NOT TARGET ${DST})
add_library(${DST} INTERFACE)
endif()

@mheriyanto
Copy link

Thanks @CalvinPaean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants