Skip to content

Commit bfccf82

Browse files
committed
Added README
1 parent 7dc9cd5 commit bfccf82

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed
File renamed without changes.

README.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# git-version
2+
This can be incorporated into your build process. If done so, it creates a source file containing git version information, which can then be used by your application.
3+
4+
5+
== Use with biicode ==
6+
Add the following to your CMakeLists.txt
7+
8+
INCLUDE(messmer/gitversion/cmake)
9+
GIT_VERSION_INIT()
10+
11+
Then, you can write in your source file:
12+
13+
#include <messmer/gitversion/gitversion.h>
14+
cout << gitversion::VERSION.major() << endl;
15+
cout << gitversion::VERSION.toString() << endl;
16+
cout << gitversion::VERSION.is_stable() << endl;
17+
cout << gitversion::VERSION.gitCommitId() << endl;
18+
// ... (see src/Version.h for more functions)
19+
20+
21+
== Use manually ==
22+
23+
There is a python script in the git-version-builder directory.
24+
To generate a version.h file containing C++ version information, call
25+
26+
python git-version-builder --lang cpp version.h

git-version-builder/README.md

-10
This file was deleted.

0 commit comments

Comments
 (0)