2012. november 24., szombat

CMake+Ninja is awesome on Windows

The AiBO+ project is multiplatform, except the cross-compilation of the apserver for AIBO. Recently, I made efforts to make the new version of the AiBO+ work on Windows before doing a release. What I experienced that the CMake+MinGW building is braindead slow. I remember that it was slow in the past, but it is now like completely unusable.

One of my colleagues recommended me the Ninja as a new build system using with CMake. I tried on Linux, but it did not work since I have a bit of hackish way to cross-build the AIBO specific binaries. On Windows, it does an awesome job to build my software parallel and utilize the 100 % of the CPU horsepower for complation. It is very easy to use:
1. Download the Ninja for Windows (ninja-120715-win.zip) from https://github.com/martine/ninja/downloads.
2. Extract the ninja.exe from the zip somewhere and add the location to the path.
3. Generate ninja based build files with CMake: e.g cmake . -G Ninja
4. Build the your project wih a simple ninja command.
5. Install the software with "ninja install" command.

Edit: There is some kind of issue with the dependency checking when updating the source tree by pulling changes from a git repository. Ninja does not detect the changes properly.

Nincsenek megjegyzések: