Hi! I just had this issue myself, and I’m aware this is an old topic, but adding the following flags solved it for me:
-G “Visual Studio 15 2017” -A x64
so the full line would be:
cmake -DCMAKE_PREFIX_PATH=/path/to/libtorch … -G “Visual Studio 15 2017” -A x64
source, from the CMake documentations 5