comparison revisions.pl.in @ 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 c86a629f24dd
children
comparison
equal deleted inserted replaced
1470:da3262e901b4 1471:230765fc82f4
60 print $revh $out; 60 print $revh $out;
61 close $revh; 61 close $revh;
62 } 62 }
63 63
64 # Allow the user to manually define it on the command line... 64 # Allow the user to manually define it on the command line...
65 $out = qq!#ifndef LLVM_REV 65 $out = qq@#ifndef LLVM_REV
66 66
67 // LLVM svn revision number, used to adapt to changes in LLVM 67 // LLVM svn revision number, used to adapt to changes in LLVM
68 // (Is 0 if LLVM is not an SVN trunk version) 68 // (Is 0 if LLVM is not an SVN trunk version)
69 #define LLVM_REV $llvm_rev_nr 69 #define LLVM_REV $llvm_rev_nr
70 70
71 #endif // LLVM_REV\n!; 71 #endif // LLVM_REV
72
73 #if !LLVM_REV
74 #error "You need to add '-DLLVM_REV=<your-llvm-rev>' to CMAKE_CXX_FLAGS in the cmake configuration"
75 #elif LLVM_REV < 67588
76 #error "Please update to a more recent LLVM version"
77 #endif\n@;
72 78
73 $old = ""; 79 $old = "";
74 open $revh, "llvm-version.h" and $old = join "", <$revh>; 80 open $revh, "llvm-version.h" and $old = join "", <$revh>;
75 81
76 if ($old ne $out) { 82 if ($old ne $out) {