Mercurial > projects > ldc
changeset 1471:230765fc82f4
Emit nicer error messages when the user didn't set LLVM_REV and autodetection
didn't find a suitable revision or when the LLVM revision in use is too old.
author | Frits van Bommel <fvbommel wxs.nl> |
---|---|
date | Wed, 03 Jun 2009 16:09:48 +0200 |
parents | da3262e901b4 |
children | a28953f1eb43 8309ebaa23d5 |
files | revisions.pl.in |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/revisions.pl.in Wed Jun 03 15:26:58 2009 +0200 +++ b/revisions.pl.in Wed Jun 03 16:09:48 2009 +0200 @@ -62,13 +62,19 @@ } # Allow the user to manually define it on the command line... -$out = qq!#ifndef LLVM_REV +$out = qq@#ifndef LLVM_REV // LLVM svn revision number, used to adapt to changes in LLVM // (Is 0 if LLVM is not an SVN trunk version) #define LLVM_REV $llvm_rev_nr -#endif // LLVM_REV\n!; +#endif // LLVM_REV + +#if !LLVM_REV +#error "You need to add '-DLLVM_REV=<your-llvm-rev>' to CMAKE_CXX_FLAGS in the cmake configuration" +#elif LLVM_REV < 67588 +#error "Please update to a more recent LLVM version" +#endif\n@; $old = ""; open $revh, "llvm-version.h" and $old = join "", <$revh>;