****************************************************** * IncrediBuild Software - Microsoft NMAKE smaple * ****************************************************** This sample project demonstrates a simple C++ application build using NMAKE and the Submission Interface (requires the XGE Interfaces extension package). Running the Sample: =================== 1. You must have Visual Studio installed in order to run this sample. 2. Run the batch file RunNMAKESample.bat to see the NMAKE build run with IncrediBuild. 3. Note that the example is currently configured to use the MS Visual Studio 2010 compiler. If you have a different Visual Studio version installed, open RuNMAKESample.bat and replace the following line: call "%VS100COMNTOOLS%vsvars32.bat" with either: call "%VS90COMNTOOLS%vsvars32.bat" (for MS Visual Studio 2008) Or: vsvars32.bat of any other Visual studio version. Solution Description: ===================== To distribute NMAKE C++ builds with IncrediBuild, copy cl.bat and link.bat from this folder to a folder that is specified in the system path *before* the Visual Studio C++ Bin folder. Distributed NMAKE builds work using the following concept: cl.bat substitutes calls made by NMAKE to cl.exe, and, instead of executing the compiler, writes the compiler command line to a response file (CLCommands.rsp in this example). link.bat substitutes calls made by NMAKE to link.exe. It runs xgSubmit.exe with the response file (CLCommands.rsp) as input, distributing all compilation tasks to the XGE queue. Finally, it waits for all the compiler calls (using xgWait.exe) and then executes the link step. See link.bat and cl.bat in this folder for an example. Notes: ====== - This concept can be applied for additional tools called by NMAKE that you might wish to execute remotely (create a similar .bat file for each tool, modifying the batch files as appropriate). - Link steps might be a bottleneck in NMAKE builds since no compilation will take place while a link step is running.