Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ravi Mathur January 8, 2015.  What does CMake NOT do? ◦ Doesn’t compile (gcc, MSVC, llvm, make) ◦ Doesn’t manage source code (XCode, Visual Studio) ◦

Similar presentations


Presentation on theme: "Ravi Mathur January 8, 2015.  What does CMake NOT do? ◦ Doesn’t compile (gcc, MSVC, llvm, make) ◦ Doesn’t manage source code (XCode, Visual Studio) ◦"— Presentation transcript:

1 Ravi Mathur January 8, 2015

2  What does CMake NOT do? ◦ Doesn’t compile (gcc, MSVC, llvm, make) ◦ Doesn’t manage source code (XCode, Visual Studio) ◦ Doesn’t debug (gdb, lldb, Visual Studio)  What does CMake do? ◦ Generates build systems for all major platforms  Makefiles, Visual Studio projects, XCode projects ◦ Manages the generated build systems ◦ Adds layer of abstraction over platform-specific build systems (make, XCode, Visual Studio) 1/8/2015 2

3  Build System Maintenance ◦ Adding files: add.cpp filename in CMakeLists.txt ◦ Adding plugins:  Create same folder structure as other plugins  Copy/paste CMakeLists.txt from another plugin, change plugin name and source filenames ◦ Supports many Makefile, XCode, Visual Studio versions  Supports multiple out-of-source builds ◦ Create side-by-side build systems (release, debug, etc.) ◦ Create multiple platform build systems from same source ◦ Delete build folder(s) to clean GMAT folder  Very well supported ◦ Updated multiple times per year (major/minor releases) ◦ Thorough wiki and examples (incl 3 rd -party) ◦ Used in: Clang/LLVM, LAPACK, Qt, KDE, MySQL, … 1/8/2015 3

4  CMakeLists.txt input file specifies how the build system should be generated ◦ Named source files (.cpp) and include (.hpp) folders ◦ Build options (plugins, GUI, debug/release, …) ◦ Dependency checks (spice, wxwidgets, matlab, …) ◦ Platform specifics (RPATH, /MP, …)  One CMakeLists.txt file per component/plugin ◦ Specifies inputs for that component ◦ Ideally, only CMakeLists.txt files should be version controlled … build system is generated on the fly 1/8/2015 4

5 GMAT Directory CMakeLists.txt /plugins CMakeLists.txt / PluginCMakeLists.txt /src CMakeLists.txt /base, /gui, /console CMakeLists.txt /buildCMakeLists.txt 1/8/2015 5 Setup default user options, validate dependencies, load subdirectories Load selected plugin subdirectories Create distributable GMAT folder List source files & Header folders, specify output name Load subdirectories

6  Generates build system that builds all base & public plugin components ◦ gmatBase, gmatConsole ◦ GUI (untested) ◦ CInterface, Data Interface, DataCallback, EphemPropagator, Estimation, EventLocator, ExtraPropagators, FminconOptimizer (untested), Formation, GeometricMeasurement, GmatFunction, MatlabInterface (untested), ProductionPropagators, SaveCommand, Station 1/8/2015 6

7  Show good times… 1/8/2015 7

8  Support for GUI, remaining plugins  Support for internal GMAT plugins  Documentation ◦ Add more comments to CMakeLists.txt files ◦ GMAT Wiki for build system  Cleanup, general optimization  Understand use of CPack to package GMAT  Test with XCode (if needed/desired) 1/8/2015 8


Download ppt "Ravi Mathur January 8, 2015.  What does CMake NOT do? ◦ Doesn’t compile (gcc, MSVC, llvm, make) ◦ Doesn’t manage source code (XCode, Visual Studio) ◦"

Similar presentations


Ads by Google