R – Visual Studio Solution to SCONS

projects-and-solutionssconsvisual studio

Is there any tool that can convert a large and complex* Visual Studio 2005 (or 2008) Solution into a SCons project?

* Lots of projects and multiple configurations on multiple platforms/compilers

Best Answer

Probably not, and even if there were, SCons gives you significantly more transparency and flexibility about managing your build than visual studio does. As a starting point, it's best to do each one in turn.

  1. Create a new makefile project
  2. Clone the source from one project to another
  3. Invoke scons from the makefile command.
  4. Replace the dependancies on the old project with the scons version.
  5. Test
  6. Repeat from 1. with each project.

Once you've done a few projects, it's pretty easy to refactor the major differences between build types (shared libs, static libs and programs) and platforms into a module of common scons helpers that can be imported. On windows, consider groups of flags for things like debug and release builds, standard library linkage and exception handling.

Also, things to look out for include:

  • If you're doing cross platform builds, consider the differences between the linking models with respect to the effects of missing symbols.
  • What you'll do to deal with manifest files and invoking the visual studio tools.
  • Variant build directories (debug/release) can be tricky at the start. Start simple, and enhance your build once you're sure it's necessary.