【发布时间】:2020-01-17 14:35:01
【问题描述】:
基本上,我的问题与 How to configure CMake so that the generated Visual Studio project finds the executable?。那里的答案都不适合我。
我有一个 CMake 项目,我只想从中创建一个 Visual Studio 2019 项目:
- 所以我只是从根目录运行
cmake .。 然后我的根目录中有一个 *.sln 文件。
-
使用 Visual Studio 2019 打开后,我按下“Local Widows Debugger”按钮,编译成功,但 IDE 报错:
Unable to start program 'C:\Users...\x64\Debug\ALL_BUILD'. The system is unable to find the specified file.
使用 travis 也可以正常编译:https://travis-ci.com/Necktschnagge/markov_chain_analyzer/builds/144941090
您可以在此处查看代码:https://github.com/Necktschnagge/markov_chain_analyzer/tree/old
我需要做什么才能让 CMake 创建一个配置良好的 VS 解决方案,以便我可以运行调试器?
【问题讨论】:
-
现代 Visual Studio 版本已直接集成 CMake:docs.microsoft.com/en-us/cpp/build/…,因此您现在可以绕过所有这些。
-
你通常不会启动“all_build”项目。
标签: c++ visual-studio cmake