# HG changeset patch # User Frits van Bommel # Date 1244038188 -7200 # Node ID 230765fc82f4bed913f37717e967410b1e55c680 # Parent da3262e901b41207c24df56cdef723b0c6e23a26 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. diff -r da3262e901b4 -r 230765fc82f4 revisions.pl.in --- 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=' 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>;