[PATCH] Fix Windows build

Robinson, Paul Paul_Robinson at playstation.sony.com
Wed Nov 26 16:12:04 PST 2014


r222391 updated GetSVN.cmake to run the LLVM helper scripts GetSourceVersion
and GetRepositoryPath.  However, being shell scripts, they work only on 
Unix-y hosts; on Windows they don't work, you end up with an SVNVersion.inc 
that looks like this:

#define LLVM_REVISION ""
#define LLVM_REPOSITORY ""
#define SVN_REVISION ""
#define SVN_REPOSITORY ""

I've rewritten the scripts as best I can into CMake so they will work on 
Windows as well.  Now I get a better-looking SVNVersion.inc:

#define LLVM_REVISION "222770"
#define LLVM_REPOSITORY "http://llvm.org/svn/llvm-project/llvm/trunk"
#define SVN_REVISION "222770"
#define SVN_REPOSITORY "http://llvm.org/svn/llvm-project/cfe/trunk"

I can only test it on SVN, but I was able to clone code from another
CMake script so I'm pretty hopeful that it works for Git as well.

Thanks,
--paulr





More information about the llvm-commits mailing list