Skip to content

Creating New Libraries

Gage Larsen edited this page Aug 28, 2018 · 2 revisions

When creating a new library it is easiest to start from an older library and just modify it to work for your new library. For example if you are creating the new xmsexample library you could copy the repository xmsinterp, and modify it to fit your new library.

The following instructions will walk you through the library change for the above example.

  1. Copy the xmsinterp library onto your machine
  2. Copy files that don't change between libraries
    • .travis/
    • .gitignore
    • condabuildinfo.cmake
    • generateDocumentationAndDeploy.sh
    • LICENSE
  3. Remove the source directory that came from the old library and add your new sources.
  4. Modify .appveyor.yml, build.py, and .travis.yml
    • anywhere you see xmsinterp in this file change it to xmsexample
  5. Modify the CMakeLists.txt
    • In this file we need to update all the sources. There will be 4 sections that need to be updated. _sources, _headers, _py, _py_headers. py_headers may be combined with the regular _py sources.
    • You will also need to replace any occurrence of xmsinterp in this file with the name of your new library.
  6. Modify conanfile.py
    • Change xmsinterp to new library name
    • Review any dependencies and update the requirements function
    • Update the configure function to set the options for all of your dependencies
  7. Configure your Doxygen files
    • Talk to admin if you need more instructions for this.
  8. Setup dev folder with setenv scripts and profiles you think necessary for this library

Once the above library is complete, you can create the git repository by following these steps:

  1. Create new repository for this library on github
    • If you don't know how to do this or don't have permissions, See admin.
  2. Open a command prompt in the root directory of your new library
  3. Run the following commands
$ git init
$ git remote add origin <url-to-repository>
$ git add .
$ git commit -m "Initial commit"
$ git push origin master

Your repository is now set up and ready to go. To set up the CI go the instuctions here.

Clone this wiki locally