summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/VersionFromVCS.cmake
Commit message (Collapse)AuthorAgeFilesLines
* [cmake] Fix add_version_info_from_vcs git svn version bug.Geoff Berry2016-01-191-17/+9
| | | | | | | | | | | | | | | | | | | | Summary: add_version_info_from_vcs was setting SVN_REVISION to the last fetched svn revision when using git svn instead of the svn revision corresponding to HEAD. This leads to conflicts with the definition of SVN_REVISION in SVNVersion.inc generated by GetSVN.cmake when HEAD is not the most recently fetched svn revision. Use 'git svn info' to determine SVN_REVISION when git svn is being used instead (as is done in GetSVN.cmake). Reviewers: beanz Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D16299 llvm-svn: 258148
* [CMake] Add support for populating LLVM_REPOSITORY from CMake.Chris Bieneman2016-01-141-0/+16
| | | | | | Autoconf does this in the GetRepositoryPath script, CMake's VersionFromVCS does grab the SVN_REVISION, but doesn't populate the repository URL. llvm-svn: 257826
* CMake: Don't run 'git svn' if there is no .git/svn directory.Jim Grosbach2012-12-101-40/+42
| | | | | | | If the local checkout does not have 'git svn' references set up, don't try to use 'git svn' for version information. llvm-svn: 169749
* cmake: work with CMake < 2.8.5Dylan Noblesmith2011-12-121-1/+3
| | | | | | | | | | | CMake versions 2.8.4 and earlier were giving this error since r146323: "string end index: -1 is out of range 0 - 6" Passing -1 as the length of the desired substring was a new feature added in CMake 2.8.5: http://www.cmake.org/Bug/view.php?id=10740 llvm-svn: 146372
* Use a simpler and more reliable command for converting from HEAD toChandler Carruth2011-12-101-1/+1
| | | | | | commit-ish. Funny thing, they have a command designed for this. ;] llvm-svn: 146325
* Teach the VCS detection to set some root-level variables with the rawChandler Carruth2011-12-101-0/+3
| | | | | | | revision and git commit data extracted. This will be used in the Clang CMake build to avoid trying to re-detect the information. llvm-svn: 146324
* At the request of Michael Spencer, make the VCS version detection logicChandler Carruth2011-12-101-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in CMake a bit more handy. Previously we would get such charming versions as the following for revision NNNN and commit-ish XXXXX: 3.1svnsvn-rNNNN 3.1svngit-svn-rNNNN 3.1svngit-svn-XXXXX The mechanism selecting betwene the latter two was particularly odd, and didn't work with all of the ways git-svn repos are set up apparently. It also misses an important point -- both the revision *and* the git commit might be relevant when working on a local branch some distance from mainline. The new logic does several things: 1) It strips the redundant initial 'svn'. 2) It always looks for a git-svn revision number base, and when found includes it in the version. 3) If the git commit-ish for the current HEAD is not exactly that revision number, it is also included. The resulting strings should roughly be: 3.1svn-rNNNN 3.1git-svn-rNNNN 3.1git-svn-rNNNN-XXXXX Suggestions on formatting etc always welcome. =] I've only looked at the LLVM version string here, not Clang's (yet). Note that the commit-ish reported is *not* terribly accurate. It updates when 'cmake' is run, not when the binary is built. Still, it may be better than nothing, especially if people have fairly long-lived git repos and branches. This is not a new limitation, just didn't want anyone to be surprised. llvm-svn: 146323
* Don't try to guess svn version when current path is a symlink.Oscar Fuentes2010-10-221-2/+5
| | | | | | See PR 8473. llvm-svn: 117109
* CMake: Use the svn revision information from git-svn if available.Michael J. Spencer2010-09-081-7/+17
| | | | llvm-svn: 113405
* When building from git, add ref-id to PACKAGE_VERSIONOscar Fuentes2010-08-051-0/+13
| | | | llvm-svn: 110301
* CMake: add version control info to PACKAGE_VERSION, if available.Oscar Fuentes2010-08-031-0/+20
Adds "svn" or "git", depending on the VCS used. If svn, adds the revision number as well. llvm-svn: 110121
OpenPOWER on IntegriCloud