added README to examples and improved database version check when used from Sourcetrail
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
|
||||
## C++ API Example
|
||||
|
||||
### Requirements
|
||||
|
||||
* CMake
|
||||
* C++ Compiler
|
||||
|
||||
### Building
|
||||
|
||||
* Run cmake with `BUILD_EXAMPLES=ON`
|
||||
* Build target `cpp_api_example`
|
||||
|
||||
### Running from Command Line
|
||||
|
||||
Invoke binary located in the build directory:
|
||||
|
||||
```
|
||||
$ cpp_api_example path/to/database_file.srctrldb path/to/examples/cpp_api_example/data/example.cpp
|
||||
```
|
||||
|
||||
### Running with Sourcetrail
|
||||
|
||||
Open `cpp_api_example.srctrlprj` located in the build directory with Sourcetrail and index the project.
|
||||
Reference in New Issue
Block a user