Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cmake Primer.

Similar presentations


Presentation on theme: "Cmake Primer."— Presentation transcript:

1 Cmake Primer

2 What is CMake? Cross-platform, open-source build system
Family of tools for building, testing, and packaging software CMake is used to control the software compilation process using platform and compiler independent configuration files CMake generates native makefiles or solution files First implemented in 2000 Current release: 3.6.3 Website:

3 Using CMake Command line: cmake [<options>] (<path-to-source> | <path-to-existing-build>) configures a build system for the specified cmake project dir cmake [(-D<var>=<value>)...] -P <cmake-script-file> executes a cmake script file cmake --build <dir> [<options>] [-- <build-tool-options>...] executes the build process through a generic interface cmake -E <command> [<options>...] gives you cross platform commands

4 Using CMake cmake-gui

5 Using CMake ccmake

6 The CMake build process
Consists of two stages: Create standard (platform-specific) build files from the configuration files Use the platform native build tools for the actual building Creating the build files always prefer out-of-source builds if using cmake-gui, select the generator (for Chrono, make sure to use 64-bit) [iterate] set options → configure generate

7 Chrono CMake configuration
Using cmake-gui on Windows

8 Specify source and build locations

9 Select generator

10 Set configuration options

11 Set new configuration options

12 Iterate until all dependencies are resolved

13 Generate native build files (VS solution file)

14 Generated solution file

15 Build project

16 Chrono CMake configuration
Using ccmake on Linux

17 Prepare out-of-source build

18 Initial configuration

19 Default settings

20 Set options

21 Iterate

22 Generate native build files (Unix makefiles)

23 Generated makefile

24 Build project % make


Download ppt "Cmake Primer."

Similar presentations


Ads by Google