diff --git a/include/version.h.in b/include/version.h.in index b7e9740..5b10626 100644 --- a/include/version.h.in +++ b/include/version.h.in @@ -1,8 +1,10 @@ #pragma once -#define VERSION_MAJOR @PROJECT_VERSION_MAJOR@ -#define VERSION_MINOR @PROJECT_VERSION_MINOR@ -#define VERSION_PATCH @PROJECT_VERSION_PATCH@ -#define VERSION_TWEAK @PROJECT_VERSION_TWEAK@ +#define VERSION_MAJOR @PROJECT_VERSION_MAJOR @ +#define VERSION_MINOR @PROJECT_VERSION_MINOR @ +#define VERSION_PATCH @PROJECT_VERSION_PATCH @ +#define VERSION_TWEAK @PROJECT_VERSION_TWEAK @ #define VERSION "@PROJECT_VERSION@" + +#define PROJECT_NAME "@PROJECT_NAME@" diff --git a/src/main.cpp b/src/main.cpp index 36a4aa5..3298d6a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,10 +1,38 @@ #include #include +#include #include "version.h" +void call_test(char *) { std::cout << "call_test(char *) called" << std::endl; } + +void call_test(int) { std::cout << "call_test(int) called" << std::endl; } + int main(int argc, char **argv) { - std::cout << "Hello, world! Version " << VERSION << std::endl; + + std::cout << "Running " << PROJECT_NAME << ", version " << VERSION << "\n" + << std::endl; + + if (std::is_same::value) { + std::cout << "NULL == 0" << std::endl; + } + + if (std::is_same::value) { + std::cout << "NULL == (void *)0" << std::endl; + } + + if (std::is_same::value) { + std::cout << "NULL == __null" << std::endl; + } + + if (std::is_same::value) { + std::cout << "NULL == nullptr" << std::endl; + } + + call_test(0); + call_test(nullptr); + + std::cout << "\nExiting" << std::endl; return EXIT_SUCCESS; }