From 17afad174de050fd8708187db64ca9ab86a07549 Mon Sep 17 00:00:00 2001 From: Thad Kerosky Date: Tue, 9 Mar 2021 23:38:32 -0500 Subject: [PATCH] attempt at adding ver number config file --- anypiajs/CMakeLists.txt | 6 ++++++ anypiajs/PiaCalOutput.cpp | 7 +++++++ anypiajs/anypiajsConfig.h.in | 11 +++++++++++ 3 files changed, 24 insertions(+) create mode 100644 anypiajs/anypiajsConfig.h.in diff --git a/anypiajs/CMakeLists.txt b/anypiajs/CMakeLists.txt index 19a80a9..a0a2e0b 100644 --- a/anypiajs/CMakeLists.txt +++ b/anypiajs/CMakeLists.txt @@ -4,6 +4,12 @@ set(CMAKE_VERBOSE_MAKEFILE on) project(anypiajs) +project(anypiajs VERSION "2020.1") +project(anypiajs DESCRIPTION "The current version of the Social Security Detailed Calculator is 2020.1, which was released on December 31, 2019. It updates the 2019.2 version with the new economic information from the automatic adjustments announced on October 10, 2019.") + +configure_file(anypiajsConfig.h.in +include_directories(${PROJECT_BINARY_BIN})) + if(CMAKE_SYSTEM_NAME STREQUAL Emscripten) # CMake's Emscripten settings search for everything under # the toolchain prefix, this breaks Boost find_package. diff --git a/anypiajs/PiaCalOutput.cpp b/anypiajs/PiaCalOutput.cpp index 45f151d..7f5fc3b 100644 --- a/anypiajs/PiaCalOutput.cpp +++ b/anypiajs/PiaCalOutput.cpp @@ -17,12 +17,16 @@ #include "bendpia.h" #include "WageInd.h" +#include "anypiajsConfig.h" + #include #include using namespace json; + + std::string PiaCalOutput::GetPIAMethodType(const PiaMethod* pMethod) { std::string strType; @@ -377,4 +381,7 @@ void PiaCalOutput::AddWageBenefit(json::JSON& parent, const WageInd * pWageInd, parent["PIAEligibility"] = piaEligibility; parent["PIAAfterWindwfall"] = piaAfterWindfall; parent["NoncoveredPosion"] = noncoveredPension; + parent["projectname"] = PROJECT_NAME; + parent["projectversion"] = PROJECT_VER; + parent["projectdescription"] = PROJECT_DESC; } diff --git a/anypiajs/anypiajsConfig.h.in b/anypiajs/anypiajsConfig.h.in new file mode 100644 index 0000000..8ccc564 --- /dev/null +++ b/anypiajs/anypiajsConfig.h.in @@ -0,0 +1,11 @@ +#ifndef INCLUDE_GUARD +#define INCLUDE_GUARD + +#define PROJECT_NAME "@PROJECT_NAME@" +#define PROJECT_VER "@PROJECT_VERSION@" +#define PROJECT_DESC "@PROJECT_DESCRIPTION@" +#define PROJECT_VER_MAJOR "@PROJECT_VERSION_MAJOR@" +#define PROJECT_VER_MINOR "@PROJECT_VERSION_MINOR@" +#define PTOJECT_VER_PATCH "@PROJECT_VERSION_PATCH@" + +#endif // INCLUDE_GUARD \ No newline at end of file