Remove global GIT_COMMIT_HASH define, use GitVersionHash global var

* On windows, the change in a global GIT_COMMIT_HASH define in each
  project needing it meant a full rebuild every time the commit changed.
* Ideally we'd set the define only on one file in each project, but
  MSBuild doesn't seem to support that. Instead we make a new tiny
  project that compiles a single cpp exporting a global var, and
  reference that global var in each other project.
This commit is contained in:
baldurk
2018-01-16 20:17:53 +00:00
parent 654fa1bb6c
commit dea21b20a0
18 changed files with 158 additions and 39 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ struct VersionCommand : public Command
virtual int Execute(cmdline::parser &parser, const CaptureOptions &)
{
std::cout << "renderdoccmd " << (sizeof(uintptr_t) == sizeof(uint64_t) ? "x64" : "x86")
<< " v" MAJOR_MINOR_VERSION_STRING << " built from " << GIT_COMMIT_HASH << std::endl;
<< " v" MAJOR_MINOR_VERSION_STRING << " built from " << GitVersionHash << std::endl;
#if defined(DISTRIBUTION_VERSION)
std::cout << "Packaged for " << DISTRIBUTION_NAME << " (" << DISTRIBUTION_VERSION << ") - "