]> granicus.if.org Git - llvm/commit
[cmake] GetSVN.cmake takes a list of arguments
authorBrian Gesiak <modocache@gmail.com>
Wed, 19 Jul 2017 18:37:02 +0000 (18:37 +0000)
committerBrian Gesiak <modocache@gmail.com>
Wed, 19 Jul 2017 18:37:02 +0000 (18:37 +0000)
commit0e8fd92a7221d1255dc2beaf2e3ed6743870ccc6
tree9ad830b5d0ea82355b5b24753e23929c702e5842
parentdba60ce821fb360874d1b4cad96c0b0592e9479f
[cmake] GetSVN.cmake takes a list of arguments

Summary:
GetSVN.cmake currently takes one or two pairs of <source directory path,
name>, then attempts to get the remote repository URL and source control
revision of the repositories at those one or two paths.

It takes two pairs in order for Clang to get the revision of both
itself, and its dependency LLVM.

For projects that rely upon both LLVM and Clang (Apple's Swift is one
example, but there are others), GetSVN.cmake is used to fetch *three*
revisions: Swift, Clang, and LLVM.

To support this use case, change GetSVN.cmake: instead of taking one or
two pairs (specified via `FIRST_SOURCE_DIR`/`FIRST_NAME`, have it take a list
of pairs (`SOURCE_DIRS`/`NAMES`).

In order to allow Clang to migrate, have GetSVN.cmake support both sets
of arguments for now. The old arguments can be removed once Clang begins
using the new arguments, and Swift can follow when it updates its
copy of LLVM.

Test Plan:
1. Perform a clean build of Clang, verify that `clang --version` still
   prints the correct LLVM and Clang revision information.
2. Modify Clang's CMake to use the new arguments, then perform another
   clean build. `clang --version` should still print the correct
   revision information.

Reviewers: jordan_rose, beanz, probinson

Subscribers: echristo, chapuni, llvm-commits, mgorny

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308507 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/GetSVN.cmake