简体   繁体   English

从Visual Studio项目到CMake项目

[英]From Visual Studio projects to CMake projects

I have a bunch of projects setup in Visual Studio 2008. However, from what I've done to maintain my code projects, it is not a good way to. 我在Visual Studio 2008中设置了一堆项目。但是,从维护代码项目的角度来看,这不是一个好方法。

I've known that those projects would be maintained in a much better way with CMake (CMake files) and just the code files (cpp, h). 我知道使用CMake (CMake文件)和仅代码文件(cpp,h)可以更好地维护那些项目。

So... Is there a type of conversion from my Visual Studio project files to CMakeLists.txt and other CMake files neccessary to rebuild my projects? 那么...从我的Visual Studio项目文件到CMakeLists.txt以及其他重建我的项目所需的其他CMake文件是否有某种类型的转换? Or I would have to write the CMakeLists.txt and other files for every project again? 还是我必须为每个项目再次编写CMakeLists.txt和其他文件?

I don't think that there is way of automagically converting between VS and CMake. 我认为没有办法在VS和CMake之间自动转换。

IMO you should create one project as a template (possibly with macros to do your common tasks) and then convert the rest of your projects when you have one that is working. IMO,您应该创建一个项目作为模板(可能使用宏来执行常见任务),然后在有一个可用项目时转换其余项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM