我正在使用CMake生成Visual Studio项目.除了一件事,一切都正常.
I am using CMake to generate Visual Studio projects. Everything works fine except one thing.
解决方案中的启动项目始终为ALL_BUILD.如何通过CMake将启动项目更改为我想要的真实项目?
The startup project in the solution is always ALL_BUILD. How do I change the startup project to the real project I want via CMake?
推荐答案您不能.启动项目存储在一个二进制文件中,该文件不是CMake生成的.如果没有该二进制文件,Visual Studio将默认为解决方案文件中的第一个项目,而ALL_BUILD项目始终是第一个项目.
You can't. The startup-project is stored in a binary file, which is NOT generated by CMake. Without that binary file, visual studio will default to the first project in the solution file and the ALL_BUILD project is always first...
更新:此答案是过时的",因为现在可以在CMake 3.6中使用.参见 ComicSansMS的答案.
Update: this answer is "out-of-date" since it is now feasible with CMake 3.6. See the answer by ComicSansMS.
更多推荐
如何通过CMake更改Visual Studio解决方案的启动项目?
发布评论