Menu

#22 Does not support multiple platform types (e.g. 32 and 64 bit builds)

New
nobody
None
Medium
Defect
2012-09-12
2012-09-12
Anonymous
No

Originally created by: paulmisl... (code.google.com)@gmail.com

All our projects have 32 and 64 bit builds, these equate to Win32 and x64 platform types. For both platform types the configuration names are the same (Release and Debug).

When I convert the projects all the makefiles end up with two Debug and two Release target configurations with nothing to identify them uniquely.

To fix please replace the following line in ProjectParser_CPP.cs for both 2008 and 2010:

           configurationInfo.Name = Utils.call(() => (vcConfiguration.ConfigurationName));

With this code:
            // Get target name (e.g. Release|Win32)
            string pipeString = Utils.call(() => (vcConfiguration.Name));
            // Replace '|' with '_'
            var pipe_index = pipeString.IndexOf("|");
            configurationInfo.Name = pipeString.Substring(0, pipe_index);
            configurationInfo.Name += "_";
            configurationInfo.Name += pipeString.Substring(pipe_index + 1);

This will generate makefiles with target names Release_Win32, Release_x64, Debug_Win32 and Debug_x64.

Since this will break exiting usage you might want to make it a command line option to use this new convention.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB