You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

 

CMake on Windows, Linux, and Macintosh OSX Operating Systems

This build system is currently only available when using the GSFC-internal GMAT Git repository.

Before starting, make sure that you have cloned GMAT from the GSFC-internal repository. These instructions refer to <GMAT> as the top-level GMAT repository folder.

The <GMAT> repository layout

GMAT Repository Layout

 

The GMAT build process can be broken down into three main steps:

  1. Download and configure the dependencies (e.g. CSPICE, wxWidgets, etc.)
  2. Create the build system for your OS using CMake
  3. Build GMAT

The first two steps are generally "one-time" processes that are performed immediately after downloading the GMAT repository. They result in a build system (e.g. Visual Studio solution or makefiles) that will intelligently rebuild GMAT components as needed when source or configuration files are changed.

Step 1: Download and Configure GMAT Dependencies

The <GMAT>/depends folder contains scripts to automatically download and configure the GMAT dependencies. 

Requirements:

  • Windows: Visual Studio 2010 or 2013 (Express or Paid versions). If using VS2010 Express, you will need the Microsoft 7.1 SDK.
  • Mac/Linux: 

<GMAT>/depends folder layout after dependency configuration

GMAT depends folder

 To set up GMAT dependencies, double-click the configure.sh (Mac/Linux) or configure.bat (Windows) script.

  • On Windows you will be prompted to select 32-vs-64 bit dependencies and a VisualStudio version. Choose according to your VisualStudio installation.

Folder Structure

Figure 1. Folder Structure

Windows

Tested Operating Systems

Windows 7/8

Prerequisite software
  • Microsoft Visual Studio 2010 Express or Paid versions.
    • If using express you will also need 7.1 Microsoft SDK
  • Seven Zip – Seven Zip (7-Zip)is a file archiver with a high compression ratio.
  • Wget - Wget (GNU Wget, formerly Geturl) is a free softwarepackage for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.
  • Subversion – Subversion (also known as SVN) is an open source version control system.
  • CMake – CMake is a cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.
  • OpenGL Libraries (Installed with graphics card) - OpenGL (Open Graphics Library)[3]is a cross-language, multi-platform API for rendering 2D and 3D computer graphics. The API is typically used to interact with a GPU, to achieve hardware-accelerated rendering.
Prerequisite Installation

Install all software above.

Configure Dependencies
Automatically

Open up the gmat/depends/ folder in a command prompt.

Run Configure.bat located in gmat/depends/ folder.

Usage for Configure.bat is as follows:

Configure.bat –p [ /path/to/gmat/folder/ ] –wget [ /path/to/wget/install/ ] –svn [/path/to/svn/install/ ] –sevenz [ /path/to/7zip/install/ ] –vsversion [vsversion ie. 9 | 10 | 11 ] –vspath [ /path/to/visual/studio/or/windows/sdk/ ] –latest [ true | false ]

If you do not wish to input these parameters as arguments simply modify the “Default Variables” section of Configure.bat and run Configure.bat without any arguments.

NOTE: All input paths must use quotes.

If all goes well, the script will complete with “Dependency Configuration Complete!”

To double check the dependency configuration, go to the Depends folder and verify the directory structure using figure above.

Manually

If you want to configure manually, go to the dependency section below.

Automatic Build Script Generation
Automatically

Run Build.bat located in gmat/build/ folder.

Usage for Build.bat is as follows:

Build.bat -arch [x86 | x64] -target [debug | release] -version [10.0 | 11.0]

If you do not wish to input these parameters as arguments simply modify the “Default Variables” section of Configure.bat and run Configure.bat without any arguments.

If all goes well the script will complete with “GMAT Build Complete!”

All Binary output will be in gmat/application/bin directory.

Manually
  • Copy wxWidget .dll’s from /depends/wxWidgets/wxWidget-2.8.12 to /application/bin directory.
  • Set Visual Studio Build Environment paths based on architecture and version of SDK and Visual Studio installations.
  • Generate Visual Studio Files using CMake.
  • Execute Msbuild.exe using “Clean” target against Visual Studio Solution.
  • Execute Msbuild.exe using “Rebuild” target against Visual Studio Solution.

For more notes, go to the additional notes section below.

Linux

Tested Operating Systems

Ubuntu 12.04

Prerequisite software
  • gnome-core-devel - These are the development components of the GNOME Desktop environment, an intuitive and attractive desktop.
  • build-essential - This package contains an informational list of packages which are considered essential for building Debian packages. This package also depends on the packages on that list, to make it easy to have the build-essential packages installed.
  • libgtk2.0-dev - The GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, the GTK+ is suitable for projects ranging from small one-off tools to complete application suites. This package contains the header files and static libraries which is needed for developing the GTK+ applications.
  • libgtk2.0-doc - The GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, the GTK+ is suitable for projects ranging from small one-off tools to complete application suites. This package contains the HTML documentation for the GTK+ library in /usr/share/doc/libgtk2.0-doc/ .
  • devhelp - Devhelp is a GTK+/GNOME browser for APIdocumentation; it works natively with gtk-doc (which is the API reference format for GTK+/GNOME documentation).
  • libgl1-mesa-dev – This is a free implementation of the OpenGL API -- GLX development files. Includes headers and static libraries for compiling programs with GLU.
    • Download links: The source code for libgl1-mesa-dev can be found on http://www.ubuntuupdates.org/libgl1-mesa-dev.
  • libglu1-mesa-dev – This is a free implementation of the OpenGL API -- GLX development files. Includes headers and static libraries for compiling programs with GLU.
  • freeglut3 - GLUT is a window system independent toolkit for writing OpenGL programs. It implements a simple windowing API, which makes learning about and exploring OpenGL programming very easy. GLUT is designed for constructing small to medium sized OpenGL programs, however it is not a full-featured toolkit, so large applications requiring sophisticated user interfaces are better off using native window system toolkits like GTK or Motif. This package contains libraries, and headers suitable for software development with GLUT.
  • freeglut3-dev - GLUT is a window system independent toolkit for writing OpenGL programs. It implements a simple windowing API, which makes learning about and exploring OpenGL programming very easy. GLUT is designed for constructing small to medium sized OpenGL programs, however it is not a full-featured toolkit, so large applications requiring sophisticated user interfaces are better off using native window system toolkits like GTK or Motif. This package contains libraries, and headers suitable for software development with GLUT.
  • libdevil-dev - Developer's Image Library (DevIL) is a programmer's toolkit which can load, save and convert a wide variety of image formats. It also offers basic manipulation and filtering capabilities. DevIL presents a simple programming interface similar to OpenGL's, which is easy for a developer to learn and use. Ultimate control of the images is left to the developer. This package contains the development files.
  • cmake - CMake is a cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.
  • cmake –gui - CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, pre-processor generation, code generation, and template instantiation. This package provides a simple GUI to guide you through running cmake.
  • Wget  (Part of Linux distro) - Wget (GNU Wget, formerly Geturl) is a free softwarepackage for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.
    • Download links: The source code for Wget is part of the Linux Distro package.
  • Subversion – Subversion (also known as SVN) is an open source version control system.
Prerequisite Installation

Run:  sudo apt-get install gnome-core-devel build-essential libgtk2.0-dev libgtk2.0-doc devhelp libgl1-mesa-dev libglu1-mesa-dev freeglut3 freeglut3-dev libdevil-dev subversion cmake cmake-gui

Configure Dependencies
Automatically

Open up the gmat/depends/ folder in the terminal.

Run configure.sh located in gmat/depends/ folder.

Usage for configure.sh is as follows:

configure.sh –p [ /path/to/gmat/folder/ ]

If you do not wish to input these parameters as arguments simply modify the “Default Variables” section of configure.sh and run configure.sh without any arguments.

NOTE: All input paths must use quotes.

If all goes well the script will complete with “Dependency Configuration Complete!”

To double check dependency configuration, go to the Depends folder and verify the directory structure using figure above.

Manually

If you want to configure manually, go to the dependency section below.

Automatic Build Script Generation
Automatically

Run Build.sh located in gmat/build/ folder.

Usage for Build.sh is as follows:                                                                                                     

Build.sh -arch [x86 | x64]

If you do not wish to input these parameters as arguments simply modify the “Default Variables” section of Configure.sh and run Configure.sh without any arguments.

If all goes well the script will complete with “GMAT Build Complete!”

All Binary output will be in gmat/application/bin directory.

Manually
  • Make and make install wxWidgets
  • Generate Unix Make Files using CMake.
  • Execute make against make files.

For more notes, go to the additional notes section below.

Macintosh

Tested Operating Systems

OSX Lion

Prerequisite software
  • XCode 4.3 - Xcodeis Apple's powerful integrated development environment for creating great apps for Mac, iPhone, and iPad. Xcode includes the Instruments analysis tool, iOS Simulator, and the latest Mac OS X and iOS SDKs.
  • Command Line Tools for XCode (Distro Dependent) - The Xcode interface seamlessly integrates code editing, UI design with Interface Builder, testing, and debugging, all within a single window. The embedded Apple LLVM compiler underlines coding mistakes as you type, and is even smart enough to fix the problems for you automatically.
    • Download links: Xcode now provides an interface for downloading and installing the latest command line tools, such as Apple LLVM compiler and system headers. To install these tools, go to the Downloads tab within the Xcode Preferences menu and click "Install" next to the Command Line Tools entry.
  • cmake - CMake is a cross-platform, open-source build system. CMake is a family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice.
  • cmake – gui - CMake is used to control the software compilation process using simple platform and compiler independent configuration files. CMake generates native makefiles and workspaces that can be used in the compiler environment of your choice. CMake is quite sophisticated: it is possible to support complex environments requiring system configuration, pre-processor generation, code generation, and template instantiation. This package provides a simple GUI to guide you through running cmake.
  • Wget  (Part of Linux distro) - Wget (GNU Wget, formerly Geturl) is a free softwarepackage for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.
    • Download links: The source code for Wget is part of the Mac Distro package.
  • Subversion – Subversion (also known as SVN) is an open source version control system.
Configure Dependencies
Automatically

Open up the gmat/depends/ folder in the terminal.

Run configure.sh located in gmat/depends/ folder.

Usage for configure.sh is as follows:

configure.sh –p [ /path/to/gmat/folder/ ] –mac

If you do not wish to input these parameters as arguments simply modify the “Default Variables” section of configure.sh and run configure.sh without any arguments.

NOTE: All input paths must use quotes.

If all goes well the script will complete with “Dependency Configuration Complete!”

To double check dependency configuration, go to the Depends folder and verify the directory structure using figure above.

Manually

If you want to configure manually, go to the dependency section below.

Automatic Build Script Generation
Automatically

Run Build.sh located in gmat/build/ folder.

Usage for Build.sh is as follows:                                                                                                     

Build.sh -arch [x86 | x64] -mac

If you do not wish to input these parameters as arguments simply modify the “Default Variables” section of Configure.sh and run Configure.sh without any arguments.

If all goes well the script will complete with “GMAT Build Complete!”

All Binary output will be in gmat/application/bin directory.

Manually
  • Make and make install wxWidgets
  • Generate Unix Make Files using CMake.
  • Execute make against make files.

For more links, go to the additional notes section below.

Appendix A:  

Library Dependencies  
F2C (Fortran to C)

Used in plugins and GMAT. Headers are required for GMAT which makes this a required dependency.

/depends/f2c/ contains source code and header files for GMAT (required)

/depends/bin/f2c contains 32 and 64 bit windows binaries for plugins. (No binaries exist for Linux) These will need to be built using FORTRAN inside CMake (This is still TBD).

Source can be downloaded from ftp://netlib.org/f2c/ and needs to be installed to /depends/f2c/

CSpice (Spice Toolkit for C)

Required Dependency – Used in GmatBase and GmatGUI

32 and 64 bit versions necessary for GMAT.

32 bit Source/binaries can be downloaded from: ftp://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Windows_VisualC_32bit/packages/cspice.zip

64 bit Source/Binaries can be downloaded from:  ftp://naif.jpl.nasa.gov/pub/naif/toolkit//C/PC_Windows_VisualC_64bit/packages/cspice.zip

Extract to /depends/cspice/cspice32 and cspice64 respectively.

WxWidgets

Required dependency for GmatGUI

wxWidgets build system takes care of 32 vs. 64 bit compilation.

Source can be obtained by running: svn co http://svn.wxwidgets.org/svn/wx/wxWidgets/tags/WX_2_8_12/ wxWidgets-2.8.12

Only the wxWidgets version 2.8.12 tag works with GMAT GUI.

Source should be downloaded to /depends/wxWidgets/wxWidgets-2.8.12

PCRE (Perl Compatible Regular Expressions)

Optional - Used in plugins

Checkout source using:  svn co svn://vcs.exim.org/pcre/code/tags/pcre-8.31 pcre-8.31

Or for latest: Checkout source using:  svn co svn://vcs.exim.org/pcre/code/trunk/ pcre-latest

Checkout to /depends/pcre/pcre-8.31 or /depends/pcre/pcre-latest

Sofa (Standards of Fundamental Astronomy C Library)

Optional – Used in plugins

Download from http://www.iausofa.org/2012_0301_C/sofa_c_a.zip

Extract to /depends/sofa/

TsPlot (WxWidget Plotting Library)

Optional – Used in plugins

Checkout source using:  svn co svn://svn.code.sf.net/p/tsplot/code/trunk tsplot-latest

Checkout to /depends/tsPlot

  • No labels