Home

Awesome

CMakeTemplateRenamer

This is a project, just to facilitate creating new projects from the following templates:

Credits

This project was developed as a teaching aid for UCL's "Research Computing with C++" course developed by Dr. James Hetherington and Dr. Matt Clarkson.

Usage

You need to run the following commands inside a bash shell. We normally generate our new projects on Linux/Mac. On Windows, try using git-bash.exe, or ask a colleague who is a Linux/Mac developer to do it for you. For example, to create a new project based on the template project CMakeCatchTemplate, do:

git clone https://github.com/MattClarkson/CMakeTemplateRenamer.git
git clone --recursive https://github.com/MattClarkson/CMakeCatchTemplate.git

Then this command to generate your new project.

CMakeTemplateRenamer/rename.sh A B C D E F [optional G]

Where:

Lowercase and Uppercase project names are derived from the CamelCase (argument C) and used where appropriate. The reason for having CamelCase, lowercase and UPPERCASE is due to different naming conventions for shell script variables, file names etc.

So, as a more illustrative example:

CMakeTemplateRenamer/rename.sh CMakeCatchTemplate BananaMaker BananaMaker "BananaMaker is a package for making Bananas." bm N bananamakerpython

Will result in cloning CMakeCatchTemplate into BananaMaker and all files or strings being swapped as follows:

This script will work similarly for the other named template projects. You end up with a new project, that has all the features of your chosen template.

Runtime

The script is a bit basic. When renaming CMakeCatchTemplate for example, it could easily take 20-60 minutes or so to run.