For best results, use GNU make, the Visual Studio Makefile project, and a tool you write yourself. Your makefile is a skeleton that compiles files (use a variable for a list of files), and your tool parses .sln and .vcproj files to create this list of files. The result file is included in the make file. You just need some grease for the glue and elbow - you will spend a day cursing by making an unwillingness to do what you want, then you will get his job. After starting this approach, not too much maintenance is required.
You can easily save your tool and makefile by simply throwing all the files in all projects into a mix and linking the result, using file templates to decide what happens with each file and putting all the compiler options in the make file. Or you can become smarter by pulling out #defines and including paths from the project and possibly adding a Win32 project configuration that the makefile generator uses to properly process custom build steps, excluded files, compiler options, etc.
An easy approach should satisfy the majority, since it allows someone to add new files to the project in the same way as they usually do without worrying about the make file, while at the same time making it difficult for people to accidentally change settings that they donβt want to change.
I previously described this approach (with a little more detailed information):
Good Methods for Using Makefile in VisualStudio?
(Once you have configured it, it works well, and in many ways it is more convenient than the usual VS approach, even if you do not take into account the fact that you can now use other compilers.)
please delete me
source share