Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
zoujh committed Nov 19, 2021
1 parent 64593a3 commit be1198b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Optional software:

Note that in RHEL6 system (and derivatives) an old GCC 4.4.7 is used. To enable C++11 features, we recommend to use [devtoolset](http://linux.web.cern.ch/linux/devtoolset/) packages, where GCC 4.8 or better are available.

## Build
## Build and test

Get the source code using `git clone https://github.com/SNiPER-Framework/sniper.git` or downloading a [ZIP file](https://github.com/SNiPER-Framework/sniper/archive/master.zip) from GitHub and extracting it.

Expand All @@ -37,7 +37,7 @@ $ cmake -DCMAKE_INSTALL_PREFIX=<install_dir> ..
```

There are more cmake options we can use while configuring the build:
* `-DDEBUG=OFF` : Turn debug options on. The default value is `OFF`.
* `-DDEBUG=OFF` : Switch the debug option. The default value is `OFF`.
* `-DUSE_PYTHON=ON` : Build the project with Python support. A pure C++ version will be built if it is turned off. The default value is `ON`.
* `-DUSE_PYTHON2=OFF` : Turn it on to use Python2, otherwise Python3 is used by default.
* `-DUSE_ROOT=ON` : Build components that depend on ROOT. The default value is `ON`.
Expand All @@ -49,7 +49,15 @@ Then build and install the result. Default build agent is `make` and you can cal
$ cmake --build . --target install
```

Your build is now installed to the directory you provided to CMake. For the best experience one needs to set the proper environment. This can be done with the help of shell script `share/sniper/setup.sh`, or, a modern solution, using an Environment Modules file `share/sniper/modulefiles/sniper`.
Your build is now installed to the directory you provided to CMake. For the best experience one needs to set the proper environment. This can be done with the help of shell script `<install_dir>/share/sniper/setup.sh`, or, a modern solution, using an Environment Modules file `<install_dir>/share/sniper/modulefiles/sniper`.

Suppose the environment has been set, then we can run the tests in the build directory:

```
$ make test
```

The test uses the components in `Examples`, which covers the main functionalities of SNiPER.

## Contributing

Expand Down

0 comments on commit be1198b

Please sign in to comment.