cpp: adds MSGPACK_VERSION{,_MAJOR,_MINOR} macros and msgpack{,_major,_minor} functions

This commit is contained in:
frsyuki
2010-07-06 17:10:25 +09:00
parent 3af10a1d00
commit c57f616141
2 changed files with 15 additions and 0 deletions

View File

@@ -80,6 +80,8 @@ msgpack/version.h: msgpack/version.h.in Makefile.in
-e s/VERSION_MINOR_UNDEFINED/$(VERSION_MINOR)/ \
$< > $@
#version.c: msgpack/version.h
doxygen_c:
cat ../Doxyfile > Doxyfile_c

13
cpp/test/version.cc Normal file
View File

@@ -0,0 +1,13 @@
#include <msgpack.hpp>
#include <gtest/gtest.h>
TEST(version, print)
{
printf("MSGPACK_VERSION : %s\n", MSGPACK_VERSION);
printf("MSGPACK_VERSION_MAJOR : %d\n", MSGPACK_VERSION_MAJOR);
printf("MSGPACK_VERSION_MINOR : %d\n", MSGPACK_VERSION_MINOR);
printf("msgpack_version() : %s\n", msgpack_version());
printf("msgpack_version_major() : %d\n", msgpack_version_major());
printf("msgpack_version_minor() : %d\n", msgpack_version_minor());
}