The Build process can be broken down into two phases:
This phase includes dependency configuration scripts in the form of batch files (.bat for Windows) and (.sh for Linux/Macintosh). If new dependencies are necessary these or existing dependencies need to be removed these scripts would be the place to make those changes.
The scripts can be found in the gmatroot/depends/ directory.
This phase makes use of CMake, the 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.)
The CMake files for the GMAT build system are located in gmatroot/src/ directory. Each CMake file is named CMakeLists.txt which is a required name by the CMake system.
There are currently four CMake build files. One for each project (base, gui, and console) as well as one main Script.
These scripts are located in the following directories:
NOTE: You should not add/remove any files or dependencies to the Visual Studio or Eclipse files. CMake will now handle the generation of everything. All Compiler flags will also need to be set in the CMake files.
To add or remove source files to the projects you will need to modify the CMakeLists.txt file that corresponds with the project.
To do this find the “Source Files” section in the CmakeLists.txt file and add or remove the file path and name to the “Source Files” array.
To add or remove include files to the projects you will need to modify the CMakeLists.txt file that corresponds with the project.
To do this find the “include directories for header files” section, in the CmakeLists.txt file and add a “INCLUDE_DIRECTORIES” line.
An Example would be:
To add additional functionality to the Cmake files (ie. Compiler flags, definitions, new linked libraries, etc.), please consult the CMake documentation.
After CMakeLists.txt files have been modified you can build/rebuild your project by doing one of the following:
GMAT Binaries and dependencies will be built to the gmatroot/application/bin directory. Intermediate builds will go to the gmatroot/build/src/<configuration>/<project_name>.dir/ folder. The auto generated Visual studio solution files and make files will go to the gmatroot/build/<os>/ folder.
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/
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.
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
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
Optional – Used in plugins
Download from http://www.iausofa.org/2012_0301_C/sofa_c_a.zip
Extract to /depends/sofa/
Optional – Used in plugins
Checkout source using: svn co svn://svn.code.sf.net/p/tsplot/code/trunk tsplot-latest
Checkout to /depends/tsPlot