From 8d6107bedaf45056009f4668e56abcbcf52555d3 Mon Sep 17 00:00:00 2001 From: marketideas Date: Fri, 15 Nov 2019 02:56:43 -0800 Subject: [PATCH] help and version --- CMakeLists.txt | 2 +- qasm.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 657e258..af021e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") project(QAsm) set(CMAKE_BUILD_TYPE Debug) -set(APPVERSION "1.0.1") +set(APPVERSION "4.0.9") set(LIBRARY_NAME pal) set(FIND_LIBRARY_USE_LIB64_PATHS TRUE) diff --git a/qasm.cpp b/qasm.cpp index 0bc879c..ce276e0 100644 --- a/qasm.cpp +++ b/qasm.cpp @@ -14,14 +14,18 @@ programOption PAL::appOptions[] = { { "debug", "d", "enable debug info (repeat for more verbosity)", "", false, true}, //{ "config", "f", "load configuration data from a ", " ", false, false}, - { "exec", "x", "execute a command [asm, link, reformat]", " ", false, false}, + { "exec", "x", "execute a command [asm, link, reformat] default=asm", " ", false, false}, { "", "", "", "", false, false} }; void CLASS::displayVersion() { - cerr << "version 1234" << endl << endl; + std::string s = ""; +#ifdef DEBUG + s = "-debug"; +#endif + cerr << "quickASM 16++ v" << (std::string)STRINGIFY(APPVERSION) << s << endl; } int CLASS::runServerApp(PAL_EVENTMANAGER *em) @@ -79,7 +83,7 @@ int CLASS::runCommandLineApp(void) if (commandargs.size() == 0) { - fprintf(stderr, "No files given (--help for help)\n\n"); + displayHelp(); return (res); }