From ae1763a3e4276b001abaf89d21803beafabf6701 Mon Sep 17 00:00:00 2001 From: intelligide Date: Fri, 3 Jul 2015 17:56:19 +0200 Subject: [PATCH] add Version Options --- doc/manual/libraries.rst | 9 +++++++++ doc/manual/libraries/math.rst | 35 +++++++++++++++++++++++++++++++++++ src/mkg1m/CMakeLists.txt | 8 +++++++- src/mkg1m/main.cpp | 18 +++++++++++++++++- src/mkg1m/version.h.in | 7 +++++++ 5 files changed, 75 insertions(+), 2 deletions(-) create mode 100644 doc/manual/libraries.rst create mode 100644 doc/manual/libraries/math.rst create mode 100644 src/mkg1m/version.h.in diff --git a/doc/manual/libraries.rst b/doc/manual/libraries.rst new file mode 100644 index 0000000..c177bc2 --- /dev/null +++ b/doc/manual/libraries.rst @@ -0,0 +1,9 @@ +Libraries +============================================= + +Contents: + +.. toctree:: + :maxdepth: 2 + + libraries/math \ No newline at end of file diff --git a/doc/manual/libraries/math.rst b/doc/manual/libraries/math.rst new file mode 100644 index 0000000..7424416 --- /dev/null +++ b/doc/manual/libraries/math.rst @@ -0,0 +1,35 @@ +mkg1m +***** + +Synopsis +======== + +:: + + mkg1m input [-o output][-Ldir][-l cLib] + +Description +=========== + +Convert text file to Casio G1M File + +Options +======= + +``-o input`` + Write output to file. You must use -o + to specify the output file. + +``-llibrary`` +``-l library`` + Search the library named library. + +``-Ldir`` +``-L dir`` + add all the libraries in the folder *dir*. + +``-h`` + Print usage information. + +``-v`` + Print version information. \ No newline at end of file diff --git a/src/mkg1m/CMakeLists.txt b/src/mkg1m/CMakeLists.txt index 1b3ee6b..78e930b 100644 --- a/src/mkg1m/CMakeLists.txt +++ b/src/mkg1m/CMakeLists.txt @@ -10,4 +10,10 @@ add_executable( ) install (TARGETS mkg1m - DESTINATION ${INSTALL_RUNTIME_DIR}) \ No newline at end of file + DESTINATION ${INSTALL_RUNTIME_DIR}) + +set(Mkg1m_VERSION 1.0.0) +set(Mkg1m_VERSION 1) +configure_file(version.h.in version.h @ONLY) + +include_directories(${CMAKE_BINARY_DIR}/src/mkg1m/) \ No newline at end of file diff --git a/src/mkg1m/main.cpp b/src/mkg1m/main.cpp index b987fde..ba99dce 100644 --- a/src/mkg1m/main.cpp +++ b/src/mkg1m/main.cpp @@ -6,9 +6,22 @@ #include #include #include "assemble.hpp" +#include "version.h" + using namespace std; +string getVersionString(){ + string str; + + str += "g1m-assembler-mkg1m version "; + str += MKG1M_VERSION; + str += " release "; + str += MKG1M_RELEASE; + + return str; +} + vector check_cLibraries(vector clibList, vector clibDirList){ vector clib; for(int i=0; i