CMT Tutorial Build Project
CMT Tutorial: Build a CCA Project for CMT
This tutorial describes how checkout the latest version of the CSDMS CCA components, create a bocca project for CMT, and compile the project. At the end of this tutorial, the user will be able to see their new project within CMT and run its components.
Before beginning, you will need to have loaded the necessary modules:
|
The basic steps to building the project are:
- Checkout the latest version of the CSDMS components
- Create a bocca project containing the components
- Compile the project
- Commit changes to the repository
Checkout
The collection of CSDMS components is stored in a Subversion repository. For this tutorial we will be compiling just the components for the STM project rather than the entire collection.
> git-svn clone https://csdms.colorado.edu/svn/components -s stm
Create
Move to the source directory and create a directory that will contain the build.
> cd stm
> mkdir _build && cd _build
Use cmake to configure a makefile for the bocca project, and then build the project.
> cmake ..
> make stm
This make command uses bocca-build to create the bocca project based on the XML description contained in projects/stm.xml.
Commit (Optional)
If you've made changes to the project and would like other users to see your changes in the repository, you will need to commit your local changes. First copy your changed files to the source directory that is under version control.
> cd ..
> make save
This uses bocca-save to copy all of the user-editable files from your project to the versioned source directory (src/csdms).
You now can commit your changes. How exactly you do this depends on what version control software you use (I'm using git-svn).
> git commit <changed_file>
> git-svn dcommit