gen Script Usage

The gen ruby script can be found in the SafetyNet root project folder. Inorder to use the gen script, you must switch to this folder in your shell.

The gen script will assits you in building a SafetyNet generated test project as well as running a test cases following a build.

The gen script can be used to generate IDE project files for Visual Studio and CodeBlocks. On Windows, if you have Visual Studio installed, it will make a best effort guess to determine the correct version to generate the project solution files.

Note: If you have both Visual Studio and MinGW installed on Windows

gen Command Syntax

./gen "project folder" [commands]

CommandsDescription
docOpen SafetyNet document in browser
helpOpen this help in a browser
cleanDelete all generated folders and rebuild
buildDo a clean build, don't delete generated IDE projects
g:makeOn Linux/Unix/Mac use GNU make to build
g:nmakeOn Windows use Visual Studio NMake to build
g:mingwOn Windows use MinGW to build
r:testRun unit test after build

The "project folder" must be a CMake project, that was generated using the utgen utility. The commands, "build" or "clean" MUST be the first command following the project folder. If you ommit any of these commands, then an incremental build will be perfomed.

IDE Project Generation

./gen "project folder" [generators]

Project GeneratorsDescription
g:visualstudioIDE project to generate, Visual Studio
g:codeblocksIDE project to generate, CodeBlocks
g:eclipseIDE project to generate, Eclipse
g:kdevelopIDE project to generate, KDevelop3

When you generate a makefile file, the generated folder will have a prefix of "build_" i.e.

FACT:
The gen script can be use with any CMake project to carry out the function mentioned!

Sample Usage

./gen ~/dev/myproject/test build g:make

./gen ~/dev/myproject/test g:codeblocks

gen c:\project\myapp\test build g:nmake g:mingw

gen c:\project\myapp\test build g:nmake r:test

gen c:\project\myapp\test clean g:nmake g:visualstudio

./gen doc

./gen help