GSoC/GCI Archive
Google Code-in 2012 Copyleft Games Group

Hedgewars: Check for Clang version in CMake

completed by: Bryan Dunsmore

mentors: koda, Andrey Korotaev, Xeli, Sheepy


Remember to join our IRC channel when working on this task! We are on #hedgewars at If you are new to IRC, read this tutorial from a past GCI participant.

Your task

CMake is our build structure: inside every CMakeLists.txt you can find a list of files to be compiled and a given set of options. Very powerful, opensource and crossplatform, visit to read documentation.

For our WebGL port (done by a GSoC student) we need to use clang/llvm and so we added some discovery code where we needed it. However this is not tidy and we want you to move relevant code from project_files/hwc/CMakeLists.txt and to its proper module FindClang.cmake. Note that all functionality must be preserved.


A working patch, that applies cleanly to our source tree. This patch should be in the form of a pull from clone, hg export or unified diff format (in order of preference) implementing the functionality required.