CMake refactoring P. Hristov 19/03/2014. History I  Recursive makefiles (F.Carminati): 1999-2001  Problems in dependencies  Slow  "Recursive Makefiles.

Slides:



Advertisements
Similar presentations
Configuration management
Advertisements

Lecture 3 Getting Started with ITK!. Goals for this lecture Learn how to use Cmake Build ITK Example programs that use ITK.
O. Stézowski IPN Lyon AGATA Week September 2003 Legnaro Data Analysis – Team #3 ROOT as a framework for AGATA.
Low level CASE: Source Code Management. Source Code Management  Also known as Configuration Management  Source Code Managers are tools that: –Archive.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
CODING Research Data Management. Research Data Management Coding When writing software or analytical code it is important that others and your future.
How to install CGAL Yuanzhen Wang. What is CGAL Computational Geometry Algorithms Library “Provide easy access to efficient and reliable geometric algorithms.
NA-MIC, 2008 June Workshop, IHK Akademie Westerham Engineering Methodology Sebastien BARRE, Ph.D. - Kitware, Inc.
1 Introduction to Tool chains. 2 Tool chain for the Sitara Family (but it is true for other ARM based devices as well) A tool chain is a collection of.
This chapter is extracted from Sommerville’s slides. Text book chapter
Software Process, CMake, Dashboards, CPack Bill Hoffman Kitware, Inc.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Tools and software process for the FLP prototype B. von Haller 9. June 2015 CERN.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
CCA Port, Component & Application Build Skeleton Templates “A new script toolkit for generating CCA build skeletons” Torsten Wilde and James Kohl Oak Ridge.
SUSE Linux Enterprise Server Administration (Course 3037) Chapter 4 Manage Software for SUSE Linux Enterprise Server.
Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.
Introducing NativeScript [Pavel Kolev Software Telerik: a Progress company]
The Pipeline Processing Framework LSST Applications Meeting IPAC Feb. 19, 2008 Raymond Plante National Center for Supercomputing Applications.
1 Lecture 19 Configuration Management Software Engineering.
 To explain the importance of software configuration management (CM)  To describe key CM activities namely CM planning, change management, version management.
Makefiles. makefiles Problem: You are working on one part of a large programming project (e. g., MS Word).  It consists of hundreds of individual.cpp.
Introduction Use of makefiles to manage the build process Declarative, imperative and relational rules Environment variables, phony targets, automatic.
Version control Using Git Version control, using Git1.
BLU-ICE and the Distributed Control System Constraints for Software Development Strategies Timothy M. McPhillips Stanford Synchrotron Radiation Laboratory.
ITEC 370 Lecture 16 Implementation. Review Questions? Design document on F, feedback tomorrow Midterm on F Implementation –Management (MMM) –Team roles.
Geant4 Installation Supported platforms:  Scientific Linux with gcc 4.1.2/4.6  Mac Os X 10.7 and 10.8 with gcc 4.21  Windows7 with Visual Studio.
FairRoot Build and Test System
Updating JUPITER framework using XML interface Kobe University Susumu Kishimoto.
FLUKA GUI Status FLUKA Meeting CERN, 10/7/2006.
NA-MIC National Alliance for Medical Image Computing Slicer Building and Deployment Steve Pieper, PhD.
1Offline Weekly Meeting May May 2006 AliRoot Build Integration and (Testing) System Peter Hristov Vagner Morais.
AliRoot Implementation of native CMake build system A. Grigoras, P. Hristov 19/11/20141Alice - CMake.
V. Serbo, SLAC ACAT03, 1-5 December 2003 Interactive GUI for Geant4 by Victor Serbo, SLAC.
Developing software and hardware in parallel Vladimir Rubanov ISP RAS.
National Center for Supercomputing ApplicationsNational Computational Science Grid Packaging Technology Technical Talk University of Wisconsin Condor/GPT.
Semi-Automatic patch upgrade kit
Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.
AliRoot survey P.Hristov 11/06/2013. Offline framework  AliRoot in development since 1998  Directly based on ROOT  Used since the detector TDR’s for.
SoLID simulation with GEMC Zhiwen Zhao 2015/03/26.
J.P. Wellisch, CERN/EP/SFT SCRAM Information on SCRAM J.P. Wellisch, C. Williams, S. Ashby.
 Programming - the process of creating computer programs.
Page 1 CMake Trilinos? Roscoe A. Bartlett Department of Optimization & Uncertainty Estimation Esteban J. Guillen Department.
1 Chapter 12 Configuration management This chapter is extracted from Sommerville’s slides. Text book chapter 29 1.
Unit 17: SDLC. Systems Development Life Cycle Five Major Phases Plus Documentation throughout Plus Evaluation…
Separate distribution of the analysis code (and more) P. Hristov 19/03/2014.
SPI NIGHTLIES Alex Hodgkins. SPI nightlies  Build and test various software projects each night  Provide a nightlies summary page that displays all.
NA-MIC, 2008 June Workshop, IHK Akademie Westerham Engineering Methodology Sebastien BARRE - Kitware, Inc.
Build Tools 1. Building a program for a large project is usually managed by a build tool that controls the various steps involved. These steps may include:
Transition to SVN server: follow up P.Hristov 24/01/2008.
Ravi Mathur January 8,  What does CMake NOT do? ◦ Doesn’t compile (gcc, MSVC, llvm, make) ◦ Doesn’t manage source code (XCode, Visual Studio) ◦
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
Tracking, Computing & other Stuff. Correlation of detector hits The track segments of inner and outer MDCs are matched on Cluster level The track segments.
CMake: Experience in ALICE P. Hristov 19/06/12. History I Recursive makefiles (F.Carminati): – Problems in dependencies – Slow "Recursive Makefiles.
Software development tools
CMake - Cross-Platform Make R. Douglas Barbieri Made to Order Software Corporation.
Introduction to CMake, v. 2
Version Control Systems
Build and Test system for FairRoot
Installation of the ALICE Software
Version control, using Git
Transitioning VisIt to CMake
Pipeline Execution Environment
Version Control Systems
Design and Programming
Cmake Primer.
Electronics II Physics 3620 / 6620
Kyle Fitzpatrick Konstantin Zak 11/29/2004
SPL – PS1 Introduction to C++.
Presentation transcript:

CMake refactoring P. Hristov 19/03/2014

History I  Recursive makefiles (F.Carminati):  Problems in dependencies  Slow  "Recursive Makefiles Considered Harmful" => flat makefiles similar to what Root team developed (B.Polishchuk, J.E.Revsbeck et al.): "Recursive Makefiles Considered Harmful"  Problem in dependencies if one removes files from the project  make –j… doesn’t work  Very often one has to clean the full project  CMake: considered for the first time after ALICE-FAIR Computing Meeting 04/2008 (see the backup slides)ALICE-FAIR Computing Meeting 04/2008 2

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 (not completed)  CMake: production version (A.Goel, S.Tangudu)  all targets  reimplementation of CTest/CDash (not completed)  more simplifications, improved macros 3

CMake: current status 4  After 3 years in production it is time to evaluate the situation  The parallel build is working in most of the cases  Still some issues with the dependencies  In case one uses GLOB  For header files that are copied in include subdirectory  In case of changes in the installation place  We are not able to profit from the automatic project generation  Often recompilation triggered by the current versioning

CMake: current status 5  Several targets are error prone and often need manual intervention, i.e. the RPM generation for DA and AliMDC, PAR files  Custom SPEC files created via “echo”  The dependencies are not tracked, the compilation always starts from the beginning  The version of the RPM has to be improved  The static build is not fully operational: the library is prepared, but the static AliRoot executables are not OK  The code checker and the reverse engineering tool are not operational (problem with some software the depend on)

CMake: ideas for refactoring 6  Configuration  Avoid the use of obscure environment variables (ROOTSYS, ALICE_ROOT) as “hardcoded places”  Improve the FindXXX functions. We have also many examples outside of AliRoot: FairRoot, ROOT, Geant4, AMORE, etc.  Use as much as possible templates (something.in) for creation of files (SPEC, PAR, installation scripts)  Re-implement the AliRoot versioning and introduce requirements on the versions of the external packages (ROOT, Geant3, Geant4, BOOST, CGAL, FASTJET)  Introduce feature-based compilation, i.e. if we do not have FORTRAN compiler, switch off the compilation of some modules.

CMake: ideas for refactoring 7  Structure: use “native” CMake style (see the CMake tutorials):  One sub-directory per library/binary with the same name (i.e. libSTEER  STEER, aliroot  aliroot), or with the original name if it exists  No GLOB…, use recursive add_subdirectory with explicit list of subdirectories  better tracking of dependencies  Explicit list of source files  Possibility to use library-specific compilation options  Explicit inter-library dependencies in the list of include directories  Possibility to build in any location  Creation of distributions with CPack: RPM, deb, …  Possibility to generate projects: Xcode, MS Visual Studio, Kdevelop, etc.  Possibility to generate rootmap files for automatic loading of libraries  Use of CTest/CDash

CMake refactoring: prototyping 8  In preparation for ROOT6 a prototype for the updated CMake build system was created in r6dev branch  Includes most of the modules and libraries  Some of the ideas on the structure are already implemented  The copy/paste approach has to be replaced by functions/macros  The build is significantly faster  Several targets have to be (re-)implemented  PAR files  Detector algorithms  Static build  Rule checker  Documentation  CTest/CDash

Plan 9  Start after the v5-05-Release  Move the code of each library/binary in the corresponding subdirectory. Modify the “old” CMake build system at this stage  Check other packages with CMake build for ideas and code  Improve the FindXXX functions: can be done in parallel  Implement the new functions, macros and templates: can be done in parallel  Re-implement existing targets  Branch from the master and prepare the replacement of *.pkg by CMakeLists.txt for each library/binary  Estimated time: one month with two people  Your help is very welcome!

Backup 10

FAIR-Alice WorkshopF.Uhlig 11 CMake - What is it? Open source 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

FAIR-Alice WorkshopF.Uhlig 12 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

FAIR-Alice WorkshopF.Uhlig 13 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)