6.6 配置时记录Git Hash值
准备工作
#pragma once
#include <string>
const std::string GIT_HASH = "@GIT_HASH@";#include "version.hpp"
#include <iostream>
int main() {
std::cout << "This code has been configured from version " << GIT_HASH << std::endl;
}具体实施
工作原理
Last updated