baidu-research / warp-ctc

Fast parallel CTC.
Apache License 2.0
4.06k stars 1.04k forks source link

CMake Error at CMakeLists.txt:106 (ADD_TORCH_PACKAGE): Unknown CMake command "ADD_TORCH_PACKAGE". #149

Open drago8055 opened 4 years ago

drago8055 commented 4 years ago

Hi everyone, When trying to make, I got the following error:

CMake Warning at CMakeLists.txt:48 (FIND_PACKAGE):
 By not providing "FindTorch.cmake" in CMAKE_MODULE_PATH this project has
 asked CMake to find a package configuration file provided by "Torch", but
 CMake did not find one.

 Could not find a package configuration file provided by "Torch" with any of
 the following names:

   TorchConfig.cmake
   torch-config.cmake

 Add the installation prefix of "Torch" to CMAKE_PREFIX_PATH or set
 "Torch_DIR" to a directory containing one of the above files.  If "Torch"
 provides a separate development package or SDK, be sure it has been
 installed.

I did the following to solve it:

export Torch_DIR=~/.conda/envs/course_work/lib/python3.7/site-packages/torch/share/cmake/Torch

Then I got the following error:

CMake Error at CMakeLists.txt:98 (INSTALL):
 INSTALL TARGETS given no LIBRARY DESTINATION for shared library target
 "warpctc".

CMake Error at CMakeLists.txt:106 (ADD_TORCH_PACKAGE):
 Unknown CMake command "ADD_TORCH_PACKAGE".

Kindly help.

1z-z1 commented 4 years ago

You need the Torch7 package installed.