[CMake] converting VS projects to CMake

Sylvain Benner benner at virtools.com
Sat Feb 9 06:43:58 EST 2008


First of all I want to clarify some points:
I talk only about large scaled development projects and I don't know 
anything about autoconf. What I had to do is to migrate a large project 
composed of dozens of Visual Studio projects with no framework to hanlde 
them and drive them. I decided to migrate to CMake and I try to explain 
why it's not doable to develop a full conversion tool for this case.
I'm not against quick and easy automatic conversions, well I will say 
export tools instead, like getting the source files or the link 
libraries and stuff, but it's not the point here. The point is "Does 
MSVC pose any other special difficulties, other than sheer 
mind-numbingness of translation?"

The answer is yes and I'm pretty sure it's not only the case for MSVC.

> What do you mean by "framework?"  
>   
A framework is all the stuff which is not just a conversion of a project 
file (vcproj, makefile, or whatever) to a working CMakeLists.txt. This 
stuff drives all the CMakeLists files which cannot live otherwise. 
Converting this kind of stuff hiding in a vcproj file is impossible to do.

> What's your alternative, write everything from scratch "so you don't have to learn anything?"  
>   
I never said this. I think learning CMake is enough and must be done 
correctly. Adding a layer of knowledge for a tool that will become 
almost useless when the migration is finished is overkill.
You can be pretty sure that 95% of the work is done for basic projects 
but for big scaled projects I doubt it, but if people can do it then I 
think they'll become famous.
> Ok, so you're on record as having your doubts and thinking this
> wouldn't work for you.  I suppose that's a data point and dealing with
> skepticism is an issue.  
>   
For big projects with dozens and dozens of project files, the issue is:  
"it will not work 100% for me and I don't want to search for the xx% 
that does not work". I prefere to start slowly and smoothly using this 
mailing list only instead of dealing with two mailing lists, but maybe 
you think about integrating a conversion feature right into CMake.

My advice for somebody who needs to convert a big scaled project running 
on MSVC:
Focus on CMake, don't cut the learning steps and start with the 
beginning is a lot more valuable. Eventually use/write/script some basic 
export tools to help you in your process.

--Sylvain


More information about the CMake mailing list