diff --git a/CMake/CMakeLists_lib.txt b/CMake/CMakeLists_lib.txt index af1942d54368c53f8acb200421138e0639b118ac..502d81f7cdc21e65c6859264f325e382ceadec20 100644 --- a/CMake/CMakeLists_lib.txt +++ b/CMake/CMakeLists_lib.txt @@ -26,6 +26,9 @@ set_target_properties(${{PROJECT_NAME}} PROPERTIES LINKER_LANGUAGE CXX INTERFACE_POSITION_INDEPENDENT_CODE ON + + VERSION ${{ALIB_VERSION}} + SOVERSION ${{ALIB_VERSION_MAJOR}} ) # if (CMAKE_BUILD_TYPE STREQUAL "Release") diff --git a/CMake/CMakeLists_root.txt b/CMake/CMakeLists_root.txt index 660769cdc8cd1ffa74eede9fe42b79f5486f3e42..2c24be81fe4c5bb766037734dce97911e0b65d77 100644 --- a/CMake/CMakeLists_root.txt +++ b/CMake/CMakeLists_root.txt @@ -15,12 +15,46 @@ endif () ################# # ALIB Versioning -set(ALIB_VERSION_MAJOR 2) -set(ALIB_VERSION_MINOR 0) -set(ALIB_VERSION_PATCH 0) +set(ALIB_VERSION_MAJOR {alib_versioning_major}) +set(ALIB_VERSION_MINOR {alib_versioning_minor}) +set(ALIB_VERSION_PATCH {alib_versioning_patch}) set(ALIB_VERSION ${{ALIB_VERSION_MAJOR}}.${{ALIB_VERSION_MINOR}}.${{ALIB_VERSION_PATCH}}) mark_as_advanced(ALIB_VERSION) +add_definitions ( -DALIB_VERSION_MAJOR=${{ALIB_VERSION_MAJOR}} -DALIB_VERSION_MINOR=${{ALIB_VERSION_MINOR}} -DALIB_VERSION_PATCH=${{ALIB_VERSION_PATCH}} -DALIB_VERSION=${{ALIB_VERSION}} ) + +# Get the current working commit hash +execute_process ( + COMMAND git rev-parse HEAD + WORKING_DIRECTORY ${{CMAKE_SOURCE_DIR}} + OUTPUT_VARIABLE ALIB_GIT_COMMIT_HASH + RESULT_VARIABLE RET_CODE + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +if("${{RET_CODE}}" STREQUAL "0") + add_definitions ( -DALIB_GIT_COMMIT_HASH=${{ALIB_GIT_COMMIT_HASH}} ) + message ( Git commit hash ${{ALIB_GIT_COMMIT_HASH}} ) +else() + message ( Git commit hash not found ) +endif() + +# Get the current working branch +execute_process ( + COMMAND git rev-parse --abbrev-ref HEAD + WORKING_DIRECTORY ${{CMAKE_SOURCE_DIR}} + OUTPUT_VARIABLE ALIB_GIT_BRANCH + RESULT_VARIABLE RET_CODE + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +if("${{RET_CODE}}" STREQUAL "0") + add_definitions ( -DALIB_GIT_BRANCH=${{ALIB_GIT_BRANCH}} ) + message ( Git branch ${{ALIB_GIT_BRANCH}} ) +else() + message ( Git branch not found ) +endif() + ###################### # Some Makefile tuning set(CMAKE_COLOR_MAKEFILE ON) @@ -97,6 +131,7 @@ if (ALIB_NOGUI) list (REMOVE_ITEM ALIB_MODULES_EXE "agui2") endif () +include_directories ( include ) ################## # Register modules diff --git a/CMake/config.ini b/CMake/config.ini index 4d15d9b95d0b925d112ece08e3f71bbe087d2dd5..4e9fd5c5899444e373109df424e810d182ff171f 100644 --- a/CMake/config.ini +++ b/CMake/config.ini @@ -1,3 +1,8 @@ +[Versioning] +major = 0 +minor = 0 +patch = 1 + [Templates] root = CMakeLists_root.txt lib = CMakeLists_lib.txt diff --git a/CMake/generate.py b/CMake/generate.py index 6ec1dd79332cf6c825d6b02efea5fa73839c2662..e250be7063e59228ab05cce18c4b562f5fc8964d 100755 --- a/CMake/generate.py +++ b/CMake/generate.py @@ -140,6 +140,9 @@ def create_root_cmakelist(dry_run, packages): f.write(TEMPLATES['root'].format( alib_modules_lib=to_rows(packages['library']), alib_modules_exe=to_rows(packages['executable']), + alib_versioning_major=config['Versioning']['major'], + alib_versioning_minor=config['Versioning']['minor'], + alib_versioning_patch=config['Versioning']['patch'], )) if dry_run: diff --git a/aaccess2/src/aaccess.cpp b/aaccess2/src/aaccess.cpp index 2b576979f0b6154449fc50cbc961b0dc0e91ee01..ecd8dbaf5b948d85a50ef60ffa099eef2161337d 100644 --- a/aaccess2/src/aaccess.cpp +++ b/aaccess2/src/aaccess.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -32,7 +34,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Access internals of automata, grammars, regexps, ...", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Access internals of automata, grammars, regexps, ...", ' ', ALIB_VERSION_STRING ); // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- std::vector < std::string > automatonSettings { diff --git a/aarbology2/src/aarbology.cpp b/aarbology2/src/aarbology.cpp index 8b8fc80a88c1b9237a7f0a53c78fe9c256ccf679..e33a99c92ef2423bf2b64f972801b9433ff13e14 100644 --- a/aarbology2/src/aarbology.cpp +++ b/aarbology2/src/aarbology.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Arbology algorithm access binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Arbology algorithm access binary", ' ', ALIB_VERSION_STRING ); std::vector < std::string > allowed; allowed.push_back ( "exactSubtreeMatch" ); diff --git a/acast2/src/acast.cpp b/acast2/src/acast.cpp index a9fa297ce921106b83ebd8595bcc26a5c394fddc..e801612116830a62ca210a5b6da668d95154410d 100644 --- a/acast2/src/acast.cpp +++ b/acast2/src/acast.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -22,7 +24,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("cast binary", ' ', "0.01"); + TCLAP::CmdLine cmd("cast binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Input to cast", false, "-", "file"); cmd.add( input ); diff --git a/acompaction2/src/acompaction.cpp b/acompaction2/src/acompaction.cpp index 9d8eb65ad2b07477dbb601a6b0f2cb686eaf268a..f77ee7dca7f453367265cc10465cb2c4336d818b 100644 --- a/acompaction2/src/acompaction.cpp +++ b/acompaction2/src/acompaction.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Automaton compaction binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Automaton compaction binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Automaton to compactify", false, "-", "file"); cmd.add( input ); diff --git a/acompare2/src/acompare.cpp b/acompare2/src/acompare.cpp index 4f91a71711a1b268f8026712ffb4075462787686..ae88ea8fb50a8b67ca3086cc2cc061f8c6bf1116 100644 --- a/acompare2/src/acompare.cpp +++ b/acompare2/src/acompare.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -21,7 +23,7 @@ int main ( int argc, char * * argv ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Regexp derivative compute binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Regexp derivative compute binary", ' ', ALIB_VERSION_STRING ); TCLAP::UnlabeledValueArg < std::string > input1 ( "input1", "The first input to compare", true, "-", "file" ); cmd.add ( input1 ); diff --git a/aconversions2/src/aconversion.cpp b/aconversions2/src/aconversion.cpp index ba1feba4d1f1edb48feb8a752197d11994427dac..16831c20fa64cc1a4c7bbf073d6ed18f54699089 100644 --- a/aconversions2/src/aconversion.cpp +++ b/aconversions2/src/aconversion.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -22,7 +24,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Converts between regular expressions, regular grammars and finite automaton.", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Converts between regular expressions, regular grammars and finite automaton.", ' ', ALIB_VERSION_STRING ); std::vector < std::string > formalisms { "fa", "re", "rg", "pda" diff --git a/aconvert2/src/aconvert.cpp b/aconvert2/src/aconvert.cpp index 6275a5ae1d97e009a07b039c3156a6228724f7b1..18e516a2ca4af8d1978df93c79a151a52c139aeb 100644 --- a/aconvert2/src/aconvert.cpp +++ b/aconvert2/src/aconvert.cpp @@ -5,6 +5,8 @@ * Author: Martin Zak */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Convert binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Convert binary", ' ', ALIB_VERSION_STRING ); TCLAP::SwitchArg automaton_from_string ( "", "automaton_from_string", "Convert automaton from string representation" ); cmd.add ( automaton_from_string ); diff --git a/aderivation2/src/aderivation.cpp b/aderivation2/src/aderivation.cpp index cafb232eacce09a95cfb71e8a5c2d8f35dbe826e..96f428e2919d00e86fc2e3c6530e635254a75fac 100644 --- a/aderivation2/src/aderivation.cpp +++ b/aderivation2/src/aderivation.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Regexp derivative compute binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Regexp derivative compute binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> string( "s", "string", "String to derivate by", false, "-", "file"); cmd.add( string ); diff --git a/adeterminize2/src/adeterminize.cpp b/adeterminize2/src/adeterminize.cpp index 221051774e279d8da05541cbcc6cc70f7ef07d36..55b2fcd3fa8548523a5b794d7f5cffb1a8cf4fd5 100644 --- a/adeterminize2/src/adeterminize.cpp +++ b/adeterminize2/src/adeterminize.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * * argv ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Automaton determinize binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Automaton determinize binary", ' ', ALIB_VERSION_STRING ); TCLAP::ValueArg < std::string > input ( "i", "input", "Automaton to determinize", false, "-", "file" ); cmd.add ( input ); diff --git a/aecho2/src/aecho.cpp b/aecho2/src/aecho.cpp index d19b65620f3aa3e3aae250278aa33bb545a4a363..9103f37c2d3ac5c91687d886af7a72df5beb3062 100644 --- a/aecho2/src/aecho.cpp +++ b/aecho2/src/aecho.cpp @@ -5,6 +5,8 @@ * Author: Martin Zak */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("echo binary", ' ', "0.01"); + TCLAP::CmdLine cmd("echo binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Input to echo", false, "-", "file"); cmd.add( input ); diff --git a/aepsilon2/src/aepsilon.cpp b/aepsilon2/src/aepsilon.cpp index 849e8ce8457ddefe456c4d05a9a52978be7cde47..ea0b74ab3f0a1f7f630a2cf90bb6cc51f99673ba 100644 --- a/aepsilon2/src/aepsilon.cpp +++ b/aepsilon2/src/aepsilon.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Automaton rename binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Automaton rename binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Automaton/Grammar where to remove epsilon transitions", false, "-", "file"); cmd.add( input ); diff --git a/agenerate2/src/agenerate.cpp b/agenerate2/src/agenerate.cpp index 8be59eae249ea94e1ebedcd8da872c13092b5294..08b9ae02748d0d25e5fd277624db5b5ea7ff0ed6 100644 --- a/agenerate2/src/agenerate.cpp +++ b/agenerate2/src/agenerate.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "String generate from grammar", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "String generate from grammar", ' ', ALIB_VERSION_STRING ); std::vector < std::string > allowed; allowed.push_back ( "upTo" ); diff --git a/agui2/src/main.cpp b/agui2/src/main.cpp index b2ef847dbba610b1ede31abfb32f13a21e9b6723..31d3ab2f6e3749734ae7fd33ce3e69f8147d2685 100644 --- a/agui2/src/main.cpp +++ b/agui2/src/main.cpp @@ -2,6 +2,8 @@ #include <MainWindow.hpp> +#include <version.hpp> + int main(int argc, char *argv[]) { QApplication a(argc, argv); diff --git a/aintegral2/src/aintegral.cpp b/aintegral2/src/aintegral.cpp index 9ebd4288098a01d64ee8f338808d11e0ad950595..93a736ac0def64750ad545c5383b9e6503594804 100644 --- a/aintegral2/src/aintegral.cpp +++ b/aintegral2/src/aintegral.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Regexp derivative compute binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Regexp derivative compute binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> string( "s", "string", "String to integrate by", false, "-", "file"); cmd.add( string ); diff --git a/aintrospection2/src/aintrospection.cpp b/aintrospection2/src/aintrospection.cpp index b84e9f41c6fdfa718c3b5f5e29f427b09b3d4ea7..a44aca0131460640e98e0c8ecb6bdf0d7879d41e 100644 --- a/aintrospection2/src/aintrospection.cpp +++ b/aintrospection2/src/aintrospection.cpp @@ -5,6 +5,8 @@ * Author: Martin Zak */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Introspection binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Introspection binary", ' ', ALIB_VERSION_STRING ); TCLAP::SwitchArg dataTypes ( "d", "datatypes", "Data types", false ); cmd.add ( dataTypes ); diff --git a/alangop2/src/alangop.cpp b/alangop2/src/alangop.cpp index 8a4c5476dc485082af7babb11f93f1f1ad03726b..6314f18c0f5ab3b1c4e584bf7da2880a3e0d5f86 100644 --- a/alangop2/src/alangop.cpp +++ b/alangop2/src/alangop.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char* argv[]) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Stringology algorithm access binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Stringology algorithm access binary", ' ', ALIB_VERSION_STRING); std::vector<std::string> allowed; allowed.push_back("unionEpsilon"); diff --git a/alib2abstraction/test-src/main.cpp b/alib2abstraction/test-src/main.cpp index 0026f79acdede6e79c6db1c16a973eb1ee2a8c51..e87a624706f4906c41c464e5ba9fd143ee83b4c8 100644 --- a/alib2abstraction/test-src/main.cpp +++ b/alib2abstraction/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2algo/test-src/main.cpp b/alib2algo/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2algo/test-src/main.cpp +++ b/alib2algo/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2algo_experimental/test-src/main.cpp b/alib2algo_experimental/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2algo_experimental/test-src/main.cpp +++ b/alib2algo_experimental/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2aux/test-src/main.cpp b/alib2aux/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2aux/test-src/main.cpp +++ b/alib2aux/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2cli/test-src/main.cpp b/alib2cli/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2cli/test-src/main.cpp +++ b/alib2cli/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2common/test-src/main.cpp b/alib2common/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2common/test-src/main.cpp +++ b/alib2common/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2data/test-src/main.cpp b/alib2data/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2data/test-src/main.cpp +++ b/alib2data/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2data_experimental/test-src/main.cpp b/alib2data_experimental/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2data_experimental/test-src/main.cpp +++ b/alib2data_experimental/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2dummy/test-src/main.cpp b/alib2dummy/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2dummy/test-src/main.cpp +++ b/alib2dummy/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2elgo/test-src/main.cpp b/alib2elgo/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2elgo/test-src/main.cpp +++ b/alib2elgo/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2graph_algo/test-src/main.cpp b/alib2graph_algo/test-src/main.cpp index 9108274fa4e1564feaf0e9031299d4398fa54a38..cdc69e4c1402e5076a2269188c923d8deb55cd5f 100644 --- a/alib2graph_algo/test-src/main.cpp +++ b/alib2graph_algo/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -90,7 +92,7 @@ CPPUNIT_NS_END int main(int argc, char *argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string"); cmd.add(testPathSegments); diff --git a/alib2graph_data/test-src/main.cpp b/alib2graph_data/test-src/main.cpp index 9108274fa4e1564feaf0e9031299d4398fa54a38..cdc69e4c1402e5076a2269188c923d8deb55cd5f 100644 --- a/alib2graph_data/test-src/main.cpp +++ b/alib2graph_data/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -90,7 +92,7 @@ CPPUNIT_NS_END int main(int argc, char *argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string"); cmd.add(testPathSegments); diff --git a/alib2gui/test-src/main.cpp b/alib2gui/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2gui/test-src/main.cpp +++ b/alib2gui/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2measure/test-src/main.cpp b/alib2measure/test-src/main.cpp index 0026f79acdede6e79c6db1c16a973eb1ee2a8c51..e87a624706f4906c41c464e5ba9fd143ee83b4c8 100644 --- a/alib2measure/test-src/main.cpp +++ b/alib2measure/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2raw/test-src/main.cpp b/alib2raw/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2raw/test-src/main.cpp +++ b/alib2raw/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2raw_cli_integration/test-src/main.cpp b/alib2raw_cli_integration/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2raw_cli_integration/test-src/main.cpp +++ b/alib2raw_cli_integration/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2std/test-src/main.cpp b/alib2std/test-src/main.cpp index 0c2f15bc1cc5ae72887893e8aeeb70c3b7f7d21a..7017268372f4a420502441920b5bc613b7fa3ed0 100644 --- a/alib2std/test-src/main.cpp +++ b/alib2std/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -95,7 +97,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2str/test-src/main.cpp b/alib2str/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2str/test-src/main.cpp +++ b/alib2str/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2str_cli_integration/test-src/main.cpp b/alib2str_cli_integration/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2str_cli_integration/test-src/main.cpp +++ b/alib2str_cli_integration/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/alib2xml/test-src/main.cpp b/alib2xml/test-src/main.cpp index fd442ebd124cc1580de43b2e1846e5063fefde68..fccf89ba66ecd630f3290e91ee1c15ffc8eca34d 100644 --- a/alib2xml/test-src/main.cpp +++ b/alib2xml/test-src/main.cpp @@ -1,3 +1,5 @@ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <cppunit/CompilerOutputter.h> @@ -97,7 +99,7 @@ CPPUNIT_NS_END int main(int argc, char* argv[]) { try { - TCLAP::CmdLine cmd("Main test binary.", ' ', "0.01"); + TCLAP::CmdLine cmd("Main test binary.", ' ', ALIB_VERSION_STRING); TCLAP::MultiArg<std::string> testPathSegments("p", "path", "test path", false, "string" ); cmd.add( testPathSegments ); diff --git a/aminimize2/src/aminimize.cpp b/aminimize2/src/aminimize.cpp index 0640cbc403dba83c98c01ff908d1fe4449b8e6aa..0ed54f1fc6e6325031b33af6f6028aa5f6b479aa 100644 --- a/aminimize2/src/aminimize.cpp +++ b/aminimize2/src/aminimize.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Automaton minimize binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Automaton minimize binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Automaton to minimize", false, "-", "file"); cmd.add( input ); diff --git a/anormalize2/src/anormalize.cpp b/anormalize2/src/anormalize.cpp index 7c95c87d1e6adb30d0431af32f0406c1439aa64a..69b74934cb3ea94889ba0f050c2929fc4f468738 100644 --- a/anormalize2/src/anormalize.cpp +++ b/anormalize2/src/anormalize.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * * argv ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Automaton normalize binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Automaton normalize binary", ' ', ALIB_VERSION_STRING ); TCLAP::ValueArg < std::string > input ( "i", "input", "Input to normalize", false, "-", "file" ); cmd.add ( input ); diff --git a/aql2/src/aql.cpp b/aql2/src/aql.cpp index a320af5c5a0fe24188fef256149cb66597ddd16f..0022612729f48e29f5461075ea6042022fe8e8eb 100644 --- a/aql2/src/aql.cpp +++ b/aql2/src/aql.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <istream> #include <iostream> @@ -51,7 +53,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Algorithms query language binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Algorithms query language binary", ' ', ALIB_VERSION_STRING ); TCLAP::MultiArg < std::string > queries ( "q", "query", "Query string", false, "string" ); cmd.add ( queries ); diff --git a/aquery2/src/aquery.cpp b/aquery2/src/aquery.cpp index 6813ac08abe72b361d229c326d5f56e6acc411fc..ddb26dd37ae17bbb1e732e9df2b02c809da3b23b 100644 --- a/aquery2/src/aquery.cpp +++ b/aquery2/src/aquery.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Stringology algorithm access binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Stringology algorithm access binary", ' ', ALIB_VERSION_STRING ); std::vector < std::string > allowed; allowed.push_back ( "suffixTrieFactors" ); diff --git a/arand2/src/arand.cpp b/arand2/src/arand.cpp index a7d57c0cd4527b80bc19de48a257917caedd6191..6bbe35bca9e28a573dea4970a173c143c5fa543b 100644 --- a/arand2/src/arand.cpp +++ b/arand2/src/arand.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -21,7 +23,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Random generator binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Random generator binary", ' ', ALIB_VERSION_STRING ); std::vector < std::string > allowed; allowed.push_back ( "FSM" ); diff --git a/araw2/src/araw.cpp b/araw2/src/araw.cpp index 0a066e9f9deace38e83f9454f23e1ae978e4e410..f09736165d96e59a3cdd8288cfca49fc9ae162ae 100644 --- a/araw2/src/araw.cpp +++ b/araw2/src/araw.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek **/ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("raw reading binary", ' ', "0.01"); + TCLAP::CmdLine cmd("raw reading binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Input to read", false, "-", "file"); cmd.add( input ); diff --git a/arename2/src/arename.cpp b/arename2/src/arename.cpp index 990de6169285f8d1d7d8dbb1656e2a4a700f7432..6ed5cea141c91b4519bfd7460baee7a4509cf4ea 100644 --- a/arename2/src/arename.cpp +++ b/arename2/src/arename.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * * argv ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Automaton rename binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Automaton rename binary", ' ', ALIB_VERSION_STRING ); TCLAP::ValueArg < std::string > input ( "i", "input", "Automaton to rename", false, "-", "file" ); cmd.add ( input ); diff --git a/areverse2/src/areverse.cpp b/areverse2/src/areverse.cpp index c8fd549b6c11f879fc5c8317afe961e3ef53e213..02857b7202545b5151c5f5bc2fa8584bdd985ca2 100644 --- a/areverse2/src/areverse.cpp +++ b/areverse2/src/areverse.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Automaton reverse binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Automaton reverse binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Automaton to reverse", false, "-", "file"); cmd.add( input ); diff --git a/arun2/src/arun.cpp b/arun2/src/arun.cpp index cfe860e49591b5da42df7af324a54ea657a39035..8296a63f695e200bd54c234098d0b42d46c1346d 100644 --- a/arun2/src/arun.cpp +++ b/arun2/src/arun.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main(int argc, char* argv[]) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Automaton run binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Automaton run binary", ' ', ALIB_VERSION_STRING); std::vector<std::string> allowed; allowed.push_back("occurrences"); diff --git a/astat2/src/astat.cpp b/astat2/src/astat.cpp index 1bbe2ece4e7b446468e4983a814b4dab2a13a3e7..28c2b60270e0363622b97c83ea79db8b41cdd50a 100644 --- a/astat2/src/astat.cpp +++ b/astat2/src/astat.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Prints useful information about raw data structures", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Prints useful information about raw data structures", ' ', ALIB_VERSION_STRING ); // ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/astringology2/src/astringology.cpp b/astringology2/src/astringology.cpp index 4b75041ba0544b22da0cf62489b920b2cf972e2e..00d1eb2df4db960667bc9fbd697b8a0c7e238bb6 100644 --- a/astringology2/src/astringology.cpp +++ b/astringology2/src/astringology.cpp @@ -5,6 +5,8 @@ * Author: Jan Travnicek */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -20,7 +22,7 @@ int main ( int argc, char * argv[] ) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd ( "Stringology algorithm access binary", ' ', "0.01" ); + TCLAP::CmdLine cmd ( "Stringology algorithm access binary", ' ', ALIB_VERSION_STRING ); std::vector < std::string > allowed; allowed.push_back ( "exactFactorMatch" ); diff --git a/atrim2/src/atrim.cpp b/atrim2/src/atrim.cpp index 0ca7ff32d953b48fb62fb1aeaf64bdae68641f07..956bbdce18dc08f630c369d7bf50298a3692a598 100644 --- a/atrim2/src/atrim.cpp +++ b/atrim2/src/atrim.cpp @@ -5,6 +5,8 @@ * Author: Tomas Pecka */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -54,7 +56,7 @@ int main(int argc, char* argv[]) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Removes unreachable and useless states from FSM, productive and unreachable nonterminals from CFG. Simplifies representation of RE", ' ', "0.01"); + TCLAP::CmdLine cmd("Removes unreachable and useless states from FSM, productive and unreachable nonterminals from CFG. Simplifies representation of RE", ' ', ALIB_VERSION_STRING); TCLAP::SwitchArg useless( "u", "useless", "Removes useless states (or symbols). (works with FSM, FTA or CFG)" ); cmd.add( useless ); diff --git a/include/version.hpp b/include/version.hpp new file mode 100644 index 0000000000000000000000000000000000000000..2d914e78a9178a5d558a474d4435f2afa0588c84 --- /dev/null +++ b/include/version.hpp @@ -0,0 +1,25 @@ +#ifndef __VERSION_HPP_ +#define __VERSION_HPP_ + +#define __alib__xstr(s) __alib__str(s) +#define __alib__str(s) #s + +#define ALIB_VERSION_STRING __alib__xstr(ALIB_VERSION) +#define ALIB_VERSION_STAMP ALIB_VERSION_MAJOR*10000+ALIB_VERSION_MINOR*100+ALIB_VERSION_PATCH + +#ifdef ALIB_GIT_COMMIT_HASH + #define ALIB_GIT_COMMIT_HASH_STRING __alib__xstr(ALIB_GIT_COMMIT_HASH) +#endif + +#ifdef ALIB_GIT_BRANCH + #define ALIB_GIT_BRANCH_STRING __alib__xstr(ALIB_GIT_BRANCH) +#endif + +#if defined ALIB_GIT_COMMIT_HASH_STRING && defined ALIB_GIT_BRANCH_STRING + #define ALIB_FULL_VERSION_STRING "version: " ALIB_VERSION_STRING " branch: " ALIB_GIT_BRANCH_STRING " hash: " ALIB_GIT_COMMIT_HASH_STRING +#else + #define ALIB_FULL_VERSION_STRING ALIB_VERSION_STRING +#endif + + +#endif // __VERSION_HPP_ diff --git a/tniceprint/src/tniceprint.cpp b/tniceprint/src/tniceprint.cpp index 51f3090c91906330caf640df6393d43c36817b7b..561c478c3e7acc87d2d0a292d9f05dbde626e62a 100644 --- a/tniceprint/src/tniceprint.cpp +++ b/tniceprint/src/tniceprint.cpp @@ -5,6 +5,8 @@ * Author: Martin Zak */ +#include <version.hpp> + #include <tclap/CmdLine.h> #include <global/GlobalData.h> #include <measure> @@ -23,7 +25,7 @@ int main(int argc, char** argv) { common::GlobalData::argc = argc; common::GlobalData::argv = argv; - TCLAP::CmdLine cmd("Tree nice print binary", ' ', "0.01"); + TCLAP::CmdLine cmd("Tree nice print binary", ' ', ALIB_VERSION_STRING); TCLAP::ValueArg<std::string> input( "i", "input", "Input to nice print", false, "-", "file"); cmd.add( input );