[CMake] Unify scripts for generating VCS headers
authorPetr Hosek <phosek@chromium.org>
Thu, 31 Jan 2019 06:21:01 +0000 (06:21 +0000)
committerPetr Hosek <phosek@chromium.org>
Thu, 31 Jan 2019 06:21:01 +0000 (06:21 +0000)
commit0e712a766e4f3e2cf9ad0e42cab6cb4d543d0320
tree59f0d05f0226a864cd489b27381d438c3201bc82
parentb37419ef6629b7c32f0a4bd309f2a2aed6f514fb
[CMake] Unify scripts for generating VCS headers

Previously, there were two different scripts for generating VCS headers:
one used by LLVM and one used by Clang. They were both similar, but
different. They were both broken in their own ways, for example the one
used by Clang didn't properly handle monorepo resulting in an incorrect
version information reported by Clang.

This change unifies two the scripts by introducing a new script that's
used from both LLVM and Clang, ensures that the new script supports both
monorepo and standalone SVN and Git setups, and removes the old scripts.

Differential Revision: https://reviews.llvm.org/D57063

llvm-svn: 352729
clang/lib/Basic/CMakeLists.txt
clang/lib/Basic/Version.cpp
llvm/CMakeLists.txt
llvm/cmake/modules/AddLLVM.cmake
llvm/cmake/modules/GenerateVersionFromCVS.cmake [deleted file]
llvm/cmake/modules/GenerateVersionFromVCS.cmake [new file with mode: 0644]
llvm/cmake/modules/GetSVN.cmake [deleted file]
llvm/cmake/modules/VersionFromVCS.cmake
llvm/include/llvm/Support/CMakeLists.txt