Omegastick/pytorch-cpp-rl

Error building project: "The source directory <repo>/lib/spdlog does not contain a CMakeLists.txt file."

0xangelo opened this issue ยท 2 comments

Hi there, I am trying to build the project but I'm currently running into the following problem when running cmake -DCMAKE_PREFIX_PATH=~/Documents/libtorch/ ..:

-- The CXX compiler identification is AppleClang 10.0.1.10010046
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found torch: /Users/angelolovatto/Documents/libtorch/lib/libtorch.dylib
CMake Error at CMakeLists.txt:45 (add_subdirectory):
  The source directory

    /Users/angelolovatto/Documents/pytorch-cpp-rl/lib/spdlog

  does not contain a CMakeLists.txt file.


-- Configuring incomplete, errors occurred!
See also "/Users/angelolovatto/Documents/pytorch-cpp-rl/build/CMakeFiles/CMakeOutput.log".

I managed to successfully run the libtorch example before building this project. I'm a newbie to cmake projects and the error above might be something trivial, so I'm asking for help.

Looks like you need to run git submodule update --init --recursive. I forget that step all the time.

Thanks! That fixes this error ๐Ÿ‘