Adding version to HogMaker

This commit is contained in:
Azamat H. Hackimov 2024-04-28 21:48:07 +03:00
parent 1926a77f19
commit 79c7749242
2 changed files with 5 additions and 1 deletions

View File

@ -7,3 +7,5 @@ add_executable(
HogMaker/HogFormat.cpp
HogMaker/HogMaker.cpp
)
add_dependencies(HogMaker get_git_hash)
target_include_directories(HogMaker PRIVATE ${PROJECT_BINARY_DIR}/lib)

View File

@ -22,6 +22,7 @@
#include <fstream>
#include <string>
#include "d3_version.h"
#include "HogFormat.h"
// TODO: To our descendants from the future: remove it when code will support C++20
@ -40,7 +41,8 @@ int main(int argc, char *argv[]) {
std::vector<std::filesystem::path> input_files;
if (argc != 3) {
std::cout << "Usage:\n"
std::cout << "HogMaker v" << D3_MAJORVER << "." << D3_MINORVER << "." << D3_BUILD << "-g" << D3_GIT_HASH << "\n"
<< "Usage:\n"
<< " " << argv[0] << " <hogfile.hog> <inputfile.txt>\n"
<< std::endl;
return 1;