如何在 Visual Studio 2022 中设置 CMAKE_PREFIX_PATH?

问题描述 投票:0回答:1

我想在 Visual studio 2022 中使用 Pytorch c++ ,这就是为什么我需要在 Visual studio 中设置 CMAKE_PREFIX_PATH ,但我不能。我尝试按照教程进行操作https://pytorch.org/cppdocs/安装.html,但我失败了。由于某种原因它不起作用。我没有错误,但我的cmake看不到libtorch的方式

我想获得使用 Pytorch c++ 的机会

c++ cmake pytorch visual-studio-2022
1个回答
0
投票

我已经在其中一个

CMakeLists.txt
文件中成功使用了这个:

list(APPEND CMAKE_PREFIX_PATH C:\\ThePath)
© www.soinside.com 2019 - 2024. All rights reserved.