Content

Cmake

CMake

I have more or less converted from GNU Make to CMake as my build tool, and have found it satisfactory til this point.

The best selling point is that it is extremely easy to have several different build configurations (e.g one using gcc-4.3.1, another using gcc-4.1.1). Another good point is that it is very easy to package build rules into cmake scripts to avoid clutter.

On the downside, however, it does have some quirks. I do not like the syntax at all, and there are several bugs.

Nevertheless, I feel content with the switch from GNU Make, and have started writing some cmake scripts to package build rules. I have currently written the following scripts:

  • OpenMP.cmake - Finds out whether your compiler supports OpenMP, and enables the correct compiler flags. You can now find it in CMake CVS
  • FindCell_SDK.cmake - Finds out wheter you have support for the Cell SDK and Cell toolchain. Also sets up build rules for SPU code (also see my crosscompiling for the Cell BE)
  • FindCUDA.cmake - Finds out wheter you have the cuda build tools, and sets up build rules (see also Abe Stephens' FindCuda.cmake for an alternative. I found this version to be too complex, and wrote my own instead). NVIDIA has now released their own CMake script for CUDA, which is in version 2.8.
  • FindCUDA_SDK.cmake - Finds out whether you have installed the CUDA SDK, and sets appropriate options.
  • BoostTest.cmake - Simple rules to automatically build and run Boost unit tests.

If any of these scripts seem interresting to you, please drop me an email, and I can send you a repository export of them :)

Log In Page last modified on November 14, 2009, at 11:24 AM