[Caffe2] How to run a simple program in C++? Bug in Caffe2Config.cmake

The Caffe2_DIR = ~/pytorch/build/Caffe2Config.cmake does not relative path correct as there is no folder named “public” in the current directory

Also if I set Caffe2_DIR= ~/pytorch/torch/share/cmake/Caffe2Config.cmake then also cmake does not include and files. I had to manually include it.

Finally I am getting linking errors. Which are the libraries I should link and in which order. Please guide I am working hard just to run a simple code using Caffe2 C++ more than a week.