Download presentation
Presentation is loading. Please wait.
Published byDonald Sparks Modified over 8 years ago
1
CMake: Experience in ALICE P. Hristov 19/06/12
2
History I Recursive makefiles (F.Carminati): 1999-2001 – Problems in dependencies – Slow "Recursive Makefiles Considered Harmful" => flat makefiles similar to what Root team developed (B.Polishchuk, J.E.Revsbeck et al.): 2001-2010 "Recursive Makefiles Considered Harmful" – Problem in dependencies if one removes files from the project CMake: considered for the first time after ALICE- FAIR Computing Meeting 04/2008
3
28.04.2008FAIR-Alice WorkshopF.Uhlig 3 CMake - What is it? Open sorce project (BSD style license) Family of tools to build, test and package software Meta build tool generates input for native tools –UNIX Makefile –Xcode –Visual Studio 6,7,8,9 IDE files –KDevelop –Eclipse Who is using it? –KDE, Scribus, SecondLife, ITK,VTK, FairRoot ;-) Who is behind CMake –Kitware, Los Alamos National Labs, Sandia National Labs, National Library of Medcine, NAMIC
4
28.04.2008FAIR-Alice WorkshopF.Uhlig 4 CMake Features Support complex custom commands –Generate code during build process which is then compiled (e.g. rootcint) –RuleChecker –Doxygen Optional component support (turn on/off features) Shared library and DLL support (version support) Single and simple input format for all platforms Automatic dependency generation (C, C++, Fortran) –Full dependencies: build a target in one directory, and everything this target depends on will be up to date Parallel builds (if supported by the native tool e.g. gmake -j4) Out of Source builds Linux, Mac OS X, SunOS, HPUX, IRIX, Windows, etc. Simple marco language Only depends on compiler and native build tool
5
28.04.2008FAIR-Alice WorkshopF.Uhlig 5 CMake Features (cont.) Color and progress output for make Automatic rerun of cmake if any cmake input file changes Graphviz output for visualization of dependency trees Works with parallel make and on build farms make help shows all possible targets in the directory make foo.o build only foo.o and everything foo.o depends on CMake has a GUI layer for easy editing of input variables CMake has a command line interface Cross compiling support (CMake 2.6)
6
History II CMake: first implementation in 2009, converted “flat makefiles” (F.Carminati, F.Uhlig) – complex processing macros, reusing lists from the “flat makefiles” – missing targets CMake: second implementation in 2010 (J.Jose) – simplification – additional targets – first implementation of CTest/CDash
7
History III CMake: production version (A.Goel, S.Tangudu) 2011- 2012 – all targets – reimplementation of CTest/Cdash (ongoing) – more simplifications, improved macros Performance (2011): similar to the flatmake files – Ubuntu (make –j4): CMake – 20m29s, Flat – 25m10s – Mac (make –j3): CMake – 37m22s, Flat – 34m26s – Ubuntu (touch AliESDtrack.h and make –j4): CMake – 10m46s, Flat – 7m52s, failed – Mac (touch AliESDtrack.h and make –j4): CMake – 6m36s, Flat – 4m58s, failed
8
Experience with CMake We should not “convert” the existing makefiles to CMake, but write directly in CMake The coexistence of makefiles and CMake make the transition more difficult Very helpful CMake mailing list We still have to profit from the possibility to generate “native projects” – some problems, for example support for Fortran in Xcode More examples/tutorials would be helpful, for example on CPack Some features of the string processing are not intuitive, for example the backslashes in the strings returned from external configuration macros CMake solved our main problem: correct treatment of dependencies when files are added to or removed from the project – Possibility to use “make –j…”
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.