SlideShare ist ein Scribd-Unternehmen logo
1 von 46
CMake: Improving Software Quality
         and Process
            January 17, 2010
               Camp KDE

          Dr. Marcus D. Hanwell
          R&D Engineer
          Kitware, Inc.
          marcus.hanwell@kitware.com
Kitware: The Company
• Founded in 1998
• Founded by 5 previous employees of GE
  Corporate Research
• Privately held, profitable from creation
• Revenues projected at $9 million in 2009
  – ~$14 million if subcontractors are included
• Approximately 65 employees
  – ~30% growth in 2009
  – More than 30 PhDs
Kitware: Core Technologies


  Supercomputing                                    Medical
   Visualization                                    Imaging
   •   Large data                                     •   Registration
   •   Parallel computing                             •   Segmentation
   •   Client / Server                                •   Image Processing
   •   Web / grid architectures                       •   Measurement
   •   Human/Computer
                                                      •   Responsive GUI
       Interaction
                                     Software
                                      Process
   Open-Source                                            Computer
    Toolkits                                               Vision
   •   Insight ToolKit (ITK)                    Expertise in:
   •   VisualizationToolkit (VTK)               • Behavior/event recognition
   •   CMake                                    • Detection and tracking
   •   ParaView                                 • Segmentation
   •   Publications and consulting              • Change Detection
Open Source Projects
•   CMake
•   CDash
•   VTK
•   ITK
•   ParaView
•   IGSTK
•   BatchMake
NAMIC: National Alliance for
Medical Computing
•   An NIH national center for biomedical computing
•   Kitware leads the NAMIC engineering core
•   Committed to open science (source and data)
•   New funding to port Slicer (open source) to Qt
•   Aimed at leading edge clinical researchers
•   More funding bodies are seeing value in open
    source
CMake: Cross Platform Build System
• Why CMake?
• CMake features
• Using CMake
• Creating CMake input files
• Where to get help
   – Mastering CMake book
   – Web page: www.cmake.org
   – http://www.cmake.org/Wiki/CMake
   – mailing list: cmake@cmake.org
Key Components
• CMake
  – Cross platform build
• CTest
  – Software testing and submission
• CDash
  – Aggregation of test results on a web server
• CPack
  – Cross platform software packaging
Why CMake? Everyone is using it
               KDE 2006 – Tipping Point!




 • 1200+ downloads per day from www.cmake.org
 • Major Linux distributions and Cygwin provide CMake packages
 • KDE, Second Life, Boost (experimentally), many others
How CMake Changes The Way We Build C++

 • Boost aims to give C++ a set of useful libraries
   like Java, Python, and C#
 • Give C++ compile portability, like the compile
   once and run everywhere of Java, and C#
   – Same build tool and files for all platforms
   – Easy to mix both large and small libraries
Who Is Involved?
Users                        Supporters
•   KDE                      •   Kitware
•   Second Life              •   ARL
•   ITK                      •   National Library of Medicine
•   VTK                      •   Sandia National Labs
•   ParaView
                             •   Los Alamos National Labs
•   Trilinos
                             •   NAMIC
•   Scribus
•   Boost (experimentally)
•   MySQL
•   LLVM
•   Many more
Autonomous Systems Use CMake!



             Argo is fully automated,
             with the onboard
             computers using code
             built using CMake. The
             helicopter is also semi-
             automated with similar
             code built using CMake!
CMake Features
• One simple language for all platforms
   – Windows, Mac OS X, Linux, UNIX variants
   – HPC/embedded platforms via cross-compilation
     (ParaView/Python)
• Generates native build systems
   –   Makefiles (GNU, NMake, Borland, etc.)
   –   KDevelop, Eclipse
   –   Visual Studio 6, 7, 8, 9 IDE
   –   Xcode
• Out-of-source build trees leave source clean
• Interactive configuration via GUI
• Multiple configurations (debug, release, etc.)
CMake Features - continued
• Automatic analysis
   – Implicit dependencies (C, C++, Fortran)
   – Transitive link dependencies
   – Ordering of linker search path and RPATH
• Advanced Makefile generation
   –   Modular, Fast, Parallel
   –   Color and progress display
   –   Help targets – make help
   –   Preprocessor targets – make foo.i
   –   Assembly targets – make foo.s
Input to CMake
• Simple scripting language in CMakeLists.txt file(s)
• Built-in commands for common rules
   – add_library(MyLib MyLib.cxx)
   – add_executable(MyExe MyMain.cxx)
• Example project using Qt 4 and new syntax:
      cmake_minimum_required(VERSION 2.8)
      project(QtProject)
      find_package(Qt4 4.5.2
        COMPONENTS QtCore QtGui QtOpenGL REQUIRED)
      include(${QT_USE_FILE})
      add_executable(mycoolapp main.cpp)
      target_link_libraries(mycoolapp ${QT_LIBRARIES})
Input to CMake: KDE Application
• Very little needs to change,
     cmake_minimum_required(VERSION 2.8)
     project(KDEProject)
     find_package(KDE4 4.4 REQUIRED)
     include(KDE4Defaults)
     include_directories(${KDE4_INCLUDES})
     kde4_add_executable(mykdeapp main.cpp)
     target_link_libraries(mykdeapp
       ${KDE4_KDEUI_LIBS})
     install(TARGETS mykdeapp
       ${INSTALL_TARGETS_DEFAULT_ARGS})
CMake Scripts
• cmake -E command
  – Cross platform command line utility
  – E.g. copy or remove files, conditionally copy...
• cmake -P script.cmake
  – Cross platform scripting utility
  – Does not generate a CmakeCache
  – Ignores all commands specific to build
    environment generation
CMake Process
  Configure Step          Generate Step

        Read
    CMakeCache.txt


                                  Write
                           Makefiles or projects
        Read
   CMakeLists.txt files




        Write
    CMakeCache.txt
Automatic Testing Benefits




           “Automated Software Testing,”
         1999, Dustin, et al, Addison Wesley
Video of ParaView Nightly Testing




               21
CDash Dashboard www.cdash.org
CDash Subproject Support


   Main Project




     Sub Projects
CDash: Query Filters
CTest Command Wrappers
Coverage: GCov/Bullseye
Valgrind/Purify
Email Notification
A submission to CDash for the project CMake has failing tests.
You have been identified as one of the authors who have checked
in changes that are part of this submission or you are listed in the default contact list.

Details on the submission can be found at http://www.cdash.org/CDash/buildSummary.php?buildid=322849

Project: CMake
Site: destiny.kitware
Build Name: HP-UX-aCC
Build Time: 2009-04-29T14:28:00 EDT
Type: Continuous
Tests failing: 85


*Tests failing* (first 5)
SystemInformationNew (http://www.cdash.org/CDash/testDetails.php?test=21959894&build=322849)
CommandLineTest (http://www.cdash.org/CDash/testDetails.php?test=21959897&build=322849)
FindPackageTest (http://www.cdash.org/CDash/testDetails.php?test=21959898&build=322849)
FindModulesExecuteAll (http://www.cdash.org/CDash/testDetails.php?test=21959899&build=322849)
StringFileTest (http://www.cdash.org/CDash/testDetails.php?test=21959900&build=322849)


-CDash on www.cdash.org
Kitware Hosted CDash   http://my.cdash.org/
CDash Testing
• Purify / valgrind
• Coverage (gcov, bullseye)
• Configuration coverage
   – Make sure different OSes, libraries and options are covered
• Image difference testing
Testing with CMake/CTest
• Testing command in CMake
  – add_test (testName exeName arg1 arg2 …)
  – Executable is expected to return 0 for passed
  – Other passing criteria can be specified
• CTest – an executable that is distributed
  with CMake, can run tests in a project
  – Used for continuous integration testing
  – Client for CDash
CTest/CDash: Current State
• Alexander Neundorf has already done a
  lot of work getting KDE dashboards up
• Currently testing full KDE modules
• If all developers start receiving email
  – Is a KStars dev interested in kalzium errors?
  – How long until they filter/unsubscribe?
  – Marble devs only
    receive Marble
     reports
KDE and Subprojects
• KDE modules are quite large
  – Typically more than 15 components
  – Developers don't normally work on all
    components in a module
  – Without subprojects testing is too noisy
• Divide KDE modules?
• Split modules into subprojects?
  – New feature in CMake 2.8
Subproject Requirements
• Add LABELS property to build system
  – Source
  – Tests
• Create custom targets for subprojects
• CMake 2.8 CTest driver scripts
  – Only need CMake 2.8 on submission hosts
  – Continue using >=CMake 2.6.2 to build
What Subprojects Get Us
• Build KDE modules in parts
• Test KDE modules in parts
• Developers receive emails about issues
  – Only for the subproject they committed to
  – CDash summaries for each part
    • Kalzium
    • Marble
  – Not everyone who committed to kdeedu!
CTest Driver Script
• Update the source directory
  – CTest added Git support in 2.8
• Configure the module
• Loop over each subproject in the module
  – Build the custom subproject target
  – Run the tests for the subproject
• Submit the result of each part
• Uses new CTest script functionality
Example CTest Driver Script
 cmake_minimun_required(VERSION 2.8)
 set(CTEST_SOURCE_DIRECTORY $ENV{HOME}/kdeedu)
 set(CTEST_BINARY_DIRECTORY $ENV{HOME}/kdeedubuild)
 set(CTEST_CMAKE_GENERATOR “Unix Makefiles”)
 set(CTEST_BUILD_COMMAND “make -j9”)


 # Empty the binary directory – clean build
 ctest_empty_binary_directory(“${CTEST_BINARY_DIRECTORY}”)
Example CTest Driver Script
 # Write initial cache
 file(WRITE
   "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
   CMAKE_BUILD_TYPE:String=DebugFull
   CMAKE_CXX_COMPILER:FILEPATH=/usr/ccache/bin/c++
 “)
 # Now start the update and configure steps
 set(CTEST_UPDATE_COMMAND “svn”)
 ctest_start(Nightly)
 ctest_update(SOURCE “${CTEST_SOURCE_DIRECTORY}”)
 ctest_submit(PARTS Update Notes)
 ctest_configure(BUILD “${CTEST_BINARY_DIRECTORY}” APPEND)
 ctest_submit(PARTS Configure)
Example CTest Driver Script
 include(
   "${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake")
 foreach(sub ${CTEST_PROJECT_SUBPROJECTS})
   set_property(GLOBAL PROPERTY SubProject ${sub})
   set_property(GLOBAL PROPERTY Label ${sub})
   set(CTEST_BUILD_TARGET ${sub})
   ctest_build(BUILD “${CTEST_BINARY_DIRECTORY}” APPEND)
   ctest_submit(PARTS Build)
   ctest_test(BUILD “${CTEST_BINARY_DIRECTORY}”
     INCLUDE_LABEL $sub)
   ctest_submit(PARTS Test)
 endforeach()
Using CTest Driver Scripts
• Invoke the CTest binary in script mode
    – ctest -S /path/to/driver_script.cmake
•   Can easily be run from a cron job, etc.
•   Can submit parts of the submission
•   Allows for much tighter control, scripting
•   Access to most of the CMake language
CTest and Git
• CTest must understand version control
  – What files have changed?
  – Who changed those files?
  – What to checkout for a nightly dashboard?
• CMake 2.8 added support for Git,
  Mercurial and Bazaar (distributed VCS)
• Also abstracted support
  – Easier to add others in the future
The Future: CTest and Git
• Is it possible to test changes before they
  are committed?
  – With distributed version control it is!
• Developer pushes experimental branch
• Requests CDash server tests this branch
  on all supported architectures
• If everything is green, proceed to merge
• Development tree is more stable!
DVCS: New Workflows

                           “Blessed” master




             Integration                      Tested




                    Only merged after testing
Cross Compiling
• New chapter in the new CMake book
• Far more important to the KDE community
  with embedded devices, e.g. N900+
• Significant work has already been done
• I need to read up on this!
Kitware is Hiring
• Looking for talented developers
• Opportunities for internships this summer
• Work on interesting, challenging problems
   – Exceptional skill in C++
   – Other languages such as Python, Tcl, Java
   – Work on Linux, Unix, Mac OS X and/or
     Windows

  http://www.kitware.com/company/jobopps.html
Thank You
• Any questions?
• I will be available afterwards
• If you would like to learn more
  – Attend the tutorial session, Monday @ 2pm
• CMake is more than just a build system!

               http://www.cmake.org/


                mhanwell@kde.org
CMake Tutorial
•   Summary of CMake
•   CMake input files
•   CMake GUIs
•   CTest – testing your code
•   CPack – packaging
•   CDash – collating test results

Weitere ähnliche Inhalte

Was ist angesagt?

Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
Virtual CD4PE Workshop
Virtual CD4PE WorkshopVirtual CD4PE Workshop
Virtual CD4PE WorkshopPuppet
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Puppet
 
You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryBo-Yi Wu
 
How to deploy PHP projects with docker
How to deploy PHP projects with dockerHow to deploy PHP projects with docker
How to deploy PHP projects with dockerRuoshi Ling
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with AugeasPuppet
 
Drush in the Composer Era
Drush in the Composer EraDrush in the Composer Era
Drush in the Composer EraPantheon
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleRoman Rodomansky
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding styleBo-Yi Wu
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
What is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xWhat is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xUlrich Krause
 
Augeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet treeAugeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet treeJulien Pivotto
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxWilliam Lee
 

Was ist angesagt? (20)

C++ for the Web
C++ for the WebC++ for the Web
C++ for the Web
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
Virtual CD4PE Workshop
Virtual CD4PE WorkshopVirtual CD4PE Workshop
Virtual CD4PE Workshop
 
Puppet evolutions
Puppet evolutionsPuppet evolutions
Puppet evolutions
 
C make tutorial
C make tutorialC make tutorial
C make tutorial
 
Native Hadoop with prebuilt spark
Native Hadoop with prebuilt sparkNative Hadoop with prebuilt spark
Native Hadoop with prebuilt spark
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020
 
You must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular LibraryYou must know about CodeIgniter Popular Library
You must know about CodeIgniter Popular Library
 
How to deploy PHP projects with docker
How to deploy PHP projects with dockerHow to deploy PHP projects with docker
How to deploy PHP projects with docker
 
Php on Windows
Php on WindowsPhp on Windows
Php on Windows
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
 
Drush in the Composer Era
Drush in the Composer EraDrush in the Composer Era
Drush in the Composer Era
 
Deploying Symfony2 app with Ansible
Deploying Symfony2 app with AnsibleDeploying Symfony2 app with Ansible
Deploying Symfony2 app with Ansible
 
PHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding stylePHP & JavaScript & CSS Coding style
PHP & JavaScript & CSS Coding style
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
What is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.xWhat is new in Notes & Domino Deleopment V10.x
What is new in Notes & Domino Deleopment V10.x
 
YouDrup_in_Drupal
YouDrup_in_DrupalYouDrup_in_Drupal
YouDrup_in_Drupal
 
ABCs of docker
ABCs of dockerABCs of docker
ABCs of docker
 
Augeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet treeAugeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet tree
 
Usage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on LinuxUsage Note of Qt ODBC Database Access on Linux
Usage Note of Qt ODBC Database Access on Linux
 

Andere mochten auch

C++ Dependency Management 2.0
C++ Dependency Management 2.0C++ Dependency Management 2.0
C++ Dependency Management 2.0Patrick Charrier
 
Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Daniele Pallastrelli
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yoctoAlex Gonzalez
 
Intro to CMake CTest CDash
Intro to CMake CTest CDashIntro to CMake CTest CDash
Intro to CMake CTest CDashFrederic Perez
 
Dependency Injection in C++ (Community Days 2015)
Dependency Injection in C++ (Community Days 2015)Dependency Injection in C++ (Community Days 2015)
Dependency Injection in C++ (Community Days 2015)Daniele Pallastrelli
 
Introduction to Process Improvement & Software Quality Assurance
Introduction to Process Improvement & Software Quality AssuranceIntroduction to Process Improvement & Software Quality Assurance
Introduction to Process Improvement & Software Quality AssuranceAriful Haque
 
Software quality
Software qualitySoftware quality
Software qualityjagadeesan
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assuranceAman Adhikari
 
Project Management Concepts (from PMBOK 5th Ed)
Project Management Concepts (from PMBOK 5th Ed)Project Management Concepts (from PMBOK 5th Ed)
Project Management Concepts (from PMBOK 5th Ed)Jeremy Jay Lim
 
Introduction To Software Quality Assurance
Introduction To Software Quality AssuranceIntroduction To Software Quality Assurance
Introduction To Software Quality Assuranceruth_reategui
 

Andere mochten auch (12)

C++ Dependency Management 2.0
C++ Dependency Management 2.0C++ Dependency Management 2.0
C++ Dependency Management 2.0
 
Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++Going native with less coupling: Dependency Injection in C++
Going native with less coupling: Dependency Injection in C++
 
Introduction to yocto
Introduction to yoctoIntroduction to yocto
Introduction to yocto
 
Intro to CMake CTest CDash
Intro to CMake CTest CDashIntro to CMake CTest CDash
Intro to CMake CTest CDash
 
Dependency Injection in C++ (Community Days 2015)
Dependency Injection in C++ (Community Days 2015)Dependency Injection in C++ (Community Days 2015)
Dependency Injection in C++ (Community Days 2015)
 
Introduction to Process Improvement & Software Quality Assurance
Introduction to Process Improvement & Software Quality AssuranceIntroduction to Process Improvement & Software Quality Assurance
Introduction to Process Improvement & Software Quality Assurance
 
Software quality
Software qualitySoftware quality
Software quality
 
Quality Assurance in Software Ind.
Quality Assurance in Software Ind.Quality Assurance in Software Ind.
Quality Assurance in Software Ind.
 
Software quality assurance
Software quality assuranceSoftware quality assurance
Software quality assurance
 
Project Management Concepts (from PMBOK 5th Ed)
Project Management Concepts (from PMBOK 5th Ed)Project Management Concepts (from PMBOK 5th Ed)
Project Management Concepts (from PMBOK 5th Ed)
 
Introduction To Software Quality Assurance
Introduction To Software Quality AssuranceIntroduction To Software Quality Assurance
Introduction To Software Quality Assurance
 
Project management
Project managementProject management
Project management
 

Ähnlich wie CMake: Improving Software Quality and Process

Kitware: Qt and Scientific Computing
Kitware: Qt and Scientific ComputingKitware: Qt and Scientific Computing
Kitware: Qt and Scientific Computingaccount inactive
 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Gilad Garon
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practicesCode Mastery
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkinsecubemarketing
 
Docker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsRightScale
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesAndreas Katzig
 
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud FoundryCloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud FoundryQAware GmbH
 
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsHybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsWeaveworks
 
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsHybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsSonja Schweigert
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDAleksandr Maklakov
 
Docker adventures in Continuous Delivery - Alex Vranceanu
Docker adventures in Continuous Delivery - Alex VranceanuDocker adventures in Continuous Delivery - Alex Vranceanu
Docker adventures in Continuous Delivery - Alex VranceanuITCamp
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Markus Eisele
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth Pilli
 
Node liveboston welcome
Node liveboston welcomeNode liveboston welcome
Node liveboston welcomeMichael Dawson
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 

Ähnlich wie CMake: Improving Software Quality and Process (20)

Kitware: Qt and Scientific Computing
Kitware: Qt and Scientific ComputingKitware: Qt and Scientific Computing
Kitware: Qt and Scientific Computing
 
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
Continuous Deployment into the Unknown with Artifactory, Bintray, Docker and ...
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Continuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with JenkinsContinuous Integration for OpenVMS with Jenkins
Continuous Integration for OpenVMS with Jenkins
 
Docker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud ApplicationsDocker in Production: How RightScale Delivers Cloud Applications
Docker in Production: How RightScale Delivers Cloud Applications
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
 
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud FoundryCloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
Cloud Platforms "demystified": Docker, Kubernetes, Knative & Cloud Foundry
 
my_resume(eng)
my_resume(eng)my_resume(eng)
my_resume(eng)
 
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsHybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
 
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOpsHybrid and Multi-Cloud Strategies for Kubernetes with GitOps
Hybrid and Multi-Cloud Strategies for Kubernetes with GitOps
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
Docker adventures in Continuous Delivery - Alex Vranceanu
Docker adventures in Continuous Delivery - Alex VranceanuDocker adventures in Continuous Delivery - Alex Vranceanu
Docker adventures in Continuous Delivery - Alex Vranceanu
 
Stay productive while slicing up the monolith
Stay productive while slicing up the monolith Stay productive while slicing up the monolith
Stay productive while slicing up the monolith
 
Mihai_Nuta
Mihai_NutaMihai_Nuta
Mihai_Nuta
 
Kubernetes @ meetic
Kubernetes @ meeticKubernetes @ meetic
Kubernetes @ meetic
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latest
 
Node liveboston welcome
Node liveboston welcomeNode liveboston welcome
Node liveboston welcome
 
Simics - Break the Rules of Product Development
Simics - Break the Rules of Product DevelopmentSimics - Break the Rules of Product Development
Simics - Break the Rules of Product Development
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 

Mehr von Marcus Hanwell

Open Chemistry, JupyterLab and data: Reproducible quantum chemistry
Open Chemistry, JupyterLab and data: Reproducible quantum chemistryOpen Chemistry, JupyterLab and data: Reproducible quantum chemistry
Open Chemistry, JupyterLab and data: Reproducible quantum chemistryMarcus Hanwell
 
Avogadro 2 and Open Chemistry
Avogadro 2 and Open ChemistryAvogadro 2 and Open Chemistry
Avogadro 2 and Open ChemistryMarcus Hanwell
 
Avogadro: Open Source Libraries and Application for Computational Chemistry
Avogadro: Open Source Libraries and Application for Computational ChemistryAvogadro: Open Source Libraries and Application for Computational Chemistry
Avogadro: Open Source Libraries and Application for Computational ChemistryMarcus Hanwell
 
Saving Science - Open Up or Perish
Saving Science - Open Up or PerishSaving Science - Open Up or Perish
Saving Science - Open Up or PerishMarcus Hanwell
 
Open Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisOpen Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisMarcus Hanwell
 
The Open Chemistry Project
The Open Chemistry ProjectThe Open Chemistry Project
The Open Chemistry ProjectMarcus Hanwell
 
Open Chemistry: Realizing Open Data, Open Standards, and Open Source
Open Chemistry: Realizing Open Data, Open Standards, and Open SourceOpen Chemistry: Realizing Open Data, Open Standards, and Open Source
Open Chemistry: Realizing Open Data, Open Standards, and Open SourceMarcus Hanwell
 
Avogadro, Open Chemistry and Semantics
Avogadro, Open Chemistry and SemanticsAvogadro, Open Chemistry and Semantics
Avogadro, Open Chemistry and SemanticsMarcus Hanwell
 
Chemical Databases and Open Chemistry on the Desktop
Chemical Databases and Open Chemistry on the DesktopChemical Databases and Open Chemistry on the Desktop
Chemical Databases and Open Chemistry on the DesktopMarcus Hanwell
 
Open Source Visualization of Scientific Data
Open Source Visualization of Scientific DataOpen Source Visualization of Scientific Data
Open Source Visualization of Scientific DataMarcus Hanwell
 
Oscon 2011 Practicing Open Science
Oscon 2011 Practicing Open ScienceOscon 2011 Practicing Open Science
Oscon 2011 Practicing Open ScienceMarcus Hanwell
 

Mehr von Marcus Hanwell (11)

Open Chemistry, JupyterLab and data: Reproducible quantum chemistry
Open Chemistry, JupyterLab and data: Reproducible quantum chemistryOpen Chemistry, JupyterLab and data: Reproducible quantum chemistry
Open Chemistry, JupyterLab and data: Reproducible quantum chemistry
 
Avogadro 2 and Open Chemistry
Avogadro 2 and Open ChemistryAvogadro 2 and Open Chemistry
Avogadro 2 and Open Chemistry
 
Avogadro: Open Source Libraries and Application for Computational Chemistry
Avogadro: Open Source Libraries and Application for Computational ChemistryAvogadro: Open Source Libraries and Application for Computational Chemistry
Avogadro: Open Source Libraries and Application for Computational Chemistry
 
Saving Science - Open Up or Perish
Saving Science - Open Up or PerishSaving Science - Open Up or Perish
Saving Science - Open Up or Perish
 
Open Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & AnalysisOpen Chemistry: Input Preparation, Data Visualization & Analysis
Open Chemistry: Input Preparation, Data Visualization & Analysis
 
The Open Chemistry Project
The Open Chemistry ProjectThe Open Chemistry Project
The Open Chemistry Project
 
Open Chemistry: Realizing Open Data, Open Standards, and Open Source
Open Chemistry: Realizing Open Data, Open Standards, and Open SourceOpen Chemistry: Realizing Open Data, Open Standards, and Open Source
Open Chemistry: Realizing Open Data, Open Standards, and Open Source
 
Avogadro, Open Chemistry and Semantics
Avogadro, Open Chemistry and SemanticsAvogadro, Open Chemistry and Semantics
Avogadro, Open Chemistry and Semantics
 
Chemical Databases and Open Chemistry on the Desktop
Chemical Databases and Open Chemistry on the DesktopChemical Databases and Open Chemistry on the Desktop
Chemical Databases and Open Chemistry on the Desktop
 
Open Source Visualization of Scientific Data
Open Source Visualization of Scientific DataOpen Source Visualization of Scientific Data
Open Source Visualization of Scientific Data
 
Oscon 2011 Practicing Open Science
Oscon 2011 Practicing Open ScienceOscon 2011 Practicing Open Science
Oscon 2011 Practicing Open Science
 

Kürzlich hochgeladen

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 

Kürzlich hochgeladen (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 

CMake: Improving Software Quality and Process

  • 1. CMake: Improving Software Quality and Process January 17, 2010 Camp KDE Dr. Marcus D. Hanwell R&D Engineer Kitware, Inc. marcus.hanwell@kitware.com
  • 2. Kitware: The Company • Founded in 1998 • Founded by 5 previous employees of GE Corporate Research • Privately held, profitable from creation • Revenues projected at $9 million in 2009 – ~$14 million if subcontractors are included • Approximately 65 employees – ~30% growth in 2009 – More than 30 PhDs
  • 3. Kitware: Core Technologies Supercomputing Medical Visualization Imaging • Large data • Registration • Parallel computing • Segmentation • Client / Server • Image Processing • Web / grid architectures • Measurement • Human/Computer • Responsive GUI Interaction Software Process Open-Source Computer Toolkits Vision • Insight ToolKit (ITK) Expertise in: • VisualizationToolkit (VTK) • Behavior/event recognition • CMake • Detection and tracking • ParaView • Segmentation • Publications and consulting • Change Detection
  • 4. Open Source Projects • CMake • CDash • VTK • ITK • ParaView • IGSTK • BatchMake
  • 5. NAMIC: National Alliance for Medical Computing • An NIH national center for biomedical computing • Kitware leads the NAMIC engineering core • Committed to open science (source and data) • New funding to port Slicer (open source) to Qt • Aimed at leading edge clinical researchers • More funding bodies are seeing value in open source
  • 6. CMake: Cross Platform Build System • Why CMake? • CMake features • Using CMake • Creating CMake input files • Where to get help – Mastering CMake book – Web page: www.cmake.org – http://www.cmake.org/Wiki/CMake – mailing list: cmake@cmake.org
  • 7.
  • 8. Key Components • CMake – Cross platform build • CTest – Software testing and submission • CDash – Aggregation of test results on a web server • CPack – Cross platform software packaging
  • 9. Why CMake? Everyone is using it KDE 2006 – Tipping Point! • 1200+ downloads per day from www.cmake.org • Major Linux distributions and Cygwin provide CMake packages • KDE, Second Life, Boost (experimentally), many others
  • 10. How CMake Changes The Way We Build C++ • Boost aims to give C++ a set of useful libraries like Java, Python, and C# • Give C++ compile portability, like the compile once and run everywhere of Java, and C# – Same build tool and files for all platforms – Easy to mix both large and small libraries
  • 11. Who Is Involved? Users Supporters • KDE • Kitware • Second Life • ARL • ITK • National Library of Medicine • VTK • Sandia National Labs • ParaView • Los Alamos National Labs • Trilinos • NAMIC • Scribus • Boost (experimentally) • MySQL • LLVM • Many more
  • 12. Autonomous Systems Use CMake! Argo is fully automated, with the onboard computers using code built using CMake. The helicopter is also semi- automated with similar code built using CMake!
  • 13. CMake Features • One simple language for all platforms – Windows, Mac OS X, Linux, UNIX variants – HPC/embedded platforms via cross-compilation (ParaView/Python) • Generates native build systems – Makefiles (GNU, NMake, Borland, etc.) – KDevelop, Eclipse – Visual Studio 6, 7, 8, 9 IDE – Xcode • Out-of-source build trees leave source clean • Interactive configuration via GUI • Multiple configurations (debug, release, etc.)
  • 14. CMake Features - continued • Automatic analysis – Implicit dependencies (C, C++, Fortran) – Transitive link dependencies – Ordering of linker search path and RPATH • Advanced Makefile generation – Modular, Fast, Parallel – Color and progress display – Help targets – make help – Preprocessor targets – make foo.i – Assembly targets – make foo.s
  • 15. Input to CMake • Simple scripting language in CMakeLists.txt file(s) • Built-in commands for common rules – add_library(MyLib MyLib.cxx) – add_executable(MyExe MyMain.cxx) • Example project using Qt 4 and new syntax: cmake_minimum_required(VERSION 2.8) project(QtProject) find_package(Qt4 4.5.2 COMPONENTS QtCore QtGui QtOpenGL REQUIRED) include(${QT_USE_FILE}) add_executable(mycoolapp main.cpp) target_link_libraries(mycoolapp ${QT_LIBRARIES})
  • 16. Input to CMake: KDE Application • Very little needs to change, cmake_minimum_required(VERSION 2.8) project(KDEProject) find_package(KDE4 4.4 REQUIRED) include(KDE4Defaults) include_directories(${KDE4_INCLUDES}) kde4_add_executable(mykdeapp main.cpp) target_link_libraries(mykdeapp ${KDE4_KDEUI_LIBS}) install(TARGETS mykdeapp ${INSTALL_TARGETS_DEFAULT_ARGS})
  • 17. CMake Scripts • cmake -E command – Cross platform command line utility – E.g. copy or remove files, conditionally copy... • cmake -P script.cmake – Cross platform scripting utility – Does not generate a CmakeCache – Ignores all commands specific to build environment generation
  • 18. CMake Process Configure Step Generate Step Read CMakeCache.txt Write Makefiles or projects Read CMakeLists.txt files Write CMakeCache.txt
  • 19. Automatic Testing Benefits “Automated Software Testing,” 1999, Dustin, et al, Addison Wesley
  • 20. Video of ParaView Nightly Testing 21
  • 22. CDash Subproject Support Main Project Sub Projects
  • 27. Email Notification A submission to CDash for the project CMake has failing tests. You have been identified as one of the authors who have checked in changes that are part of this submission or you are listed in the default contact list. Details on the submission can be found at http://www.cdash.org/CDash/buildSummary.php?buildid=322849 Project: CMake Site: destiny.kitware Build Name: HP-UX-aCC Build Time: 2009-04-29T14:28:00 EDT Type: Continuous Tests failing: 85 *Tests failing* (first 5) SystemInformationNew (http://www.cdash.org/CDash/testDetails.php?test=21959894&build=322849) CommandLineTest (http://www.cdash.org/CDash/testDetails.php?test=21959897&build=322849) FindPackageTest (http://www.cdash.org/CDash/testDetails.php?test=21959898&build=322849) FindModulesExecuteAll (http://www.cdash.org/CDash/testDetails.php?test=21959899&build=322849) StringFileTest (http://www.cdash.org/CDash/testDetails.php?test=21959900&build=322849) -CDash on www.cdash.org
  • 28. Kitware Hosted CDash http://my.cdash.org/
  • 29. CDash Testing • Purify / valgrind • Coverage (gcov, bullseye) • Configuration coverage – Make sure different OSes, libraries and options are covered • Image difference testing
  • 30. Testing with CMake/CTest • Testing command in CMake – add_test (testName exeName arg1 arg2 …) – Executable is expected to return 0 for passed – Other passing criteria can be specified • CTest – an executable that is distributed with CMake, can run tests in a project – Used for continuous integration testing – Client for CDash
  • 31. CTest/CDash: Current State • Alexander Neundorf has already done a lot of work getting KDE dashboards up • Currently testing full KDE modules • If all developers start receiving email – Is a KStars dev interested in kalzium errors? – How long until they filter/unsubscribe? – Marble devs only receive Marble reports
  • 32. KDE and Subprojects • KDE modules are quite large – Typically more than 15 components – Developers don't normally work on all components in a module – Without subprojects testing is too noisy • Divide KDE modules? • Split modules into subprojects? – New feature in CMake 2.8
  • 33. Subproject Requirements • Add LABELS property to build system – Source – Tests • Create custom targets for subprojects • CMake 2.8 CTest driver scripts – Only need CMake 2.8 on submission hosts – Continue using >=CMake 2.6.2 to build
  • 34. What Subprojects Get Us • Build KDE modules in parts • Test KDE modules in parts • Developers receive emails about issues – Only for the subproject they committed to – CDash summaries for each part • Kalzium • Marble – Not everyone who committed to kdeedu!
  • 35. CTest Driver Script • Update the source directory – CTest added Git support in 2.8 • Configure the module • Loop over each subproject in the module – Build the custom subproject target – Run the tests for the subproject • Submit the result of each part • Uses new CTest script functionality
  • 36. Example CTest Driver Script cmake_minimun_required(VERSION 2.8) set(CTEST_SOURCE_DIRECTORY $ENV{HOME}/kdeedu) set(CTEST_BINARY_DIRECTORY $ENV{HOME}/kdeedubuild) set(CTEST_CMAKE_GENERATOR “Unix Makefiles”) set(CTEST_BUILD_COMMAND “make -j9”) # Empty the binary directory – clean build ctest_empty_binary_directory(“${CTEST_BINARY_DIRECTORY}”)
  • 37. Example CTest Driver Script # Write initial cache file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" " CMAKE_BUILD_TYPE:String=DebugFull CMAKE_CXX_COMPILER:FILEPATH=/usr/ccache/bin/c++ “) # Now start the update and configure steps set(CTEST_UPDATE_COMMAND “svn”) ctest_start(Nightly) ctest_update(SOURCE “${CTEST_SOURCE_DIRECTORY}”) ctest_submit(PARTS Update Notes) ctest_configure(BUILD “${CTEST_BINARY_DIRECTORY}” APPEND) ctest_submit(PARTS Configure)
  • 38. Example CTest Driver Script include( "${CTEST_SOURCE_DIRECTORY}/CTestConfig.cmake") foreach(sub ${CTEST_PROJECT_SUBPROJECTS}) set_property(GLOBAL PROPERTY SubProject ${sub}) set_property(GLOBAL PROPERTY Label ${sub}) set(CTEST_BUILD_TARGET ${sub}) ctest_build(BUILD “${CTEST_BINARY_DIRECTORY}” APPEND) ctest_submit(PARTS Build) ctest_test(BUILD “${CTEST_BINARY_DIRECTORY}” INCLUDE_LABEL $sub) ctest_submit(PARTS Test) endforeach()
  • 39. Using CTest Driver Scripts • Invoke the CTest binary in script mode – ctest -S /path/to/driver_script.cmake • Can easily be run from a cron job, etc. • Can submit parts of the submission • Allows for much tighter control, scripting • Access to most of the CMake language
  • 40. CTest and Git • CTest must understand version control – What files have changed? – Who changed those files? – What to checkout for a nightly dashboard? • CMake 2.8 added support for Git, Mercurial and Bazaar (distributed VCS) • Also abstracted support – Easier to add others in the future
  • 41. The Future: CTest and Git • Is it possible to test changes before they are committed? – With distributed version control it is! • Developer pushes experimental branch • Requests CDash server tests this branch on all supported architectures • If everything is green, proceed to merge • Development tree is more stable!
  • 42. DVCS: New Workflows “Blessed” master Integration Tested Only merged after testing
  • 43. Cross Compiling • New chapter in the new CMake book • Far more important to the KDE community with embedded devices, e.g. N900+ • Significant work has already been done • I need to read up on this!
  • 44. Kitware is Hiring • Looking for talented developers • Opportunities for internships this summer • Work on interesting, challenging problems – Exceptional skill in C++ – Other languages such as Python, Tcl, Java – Work on Linux, Unix, Mac OS X and/or Windows http://www.kitware.com/company/jobopps.html
  • 45. Thank You • Any questions? • I will be available afterwards • If you would like to learn more – Attend the tutorial session, Monday @ 2pm • CMake is more than just a build system! http://www.cmake.org/ mhanwell@kde.org
  • 46. CMake Tutorial • Summary of CMake • CMake input files • CMake GUIs • CTest – testing your code • CPack – packaging • CDash – collating test results