Added check to see if the passed path is correct by checking if it contains the file AST.h

This commit is contained in:
Erik Verbruggen
2010-03-18 13:56:47 +01:00
parent 5058233bdd
commit 33d5928322

View File

@@ -1060,8 +1060,13 @@ int main(int argc, char *argv[])
}
QDir cplusplusDir(files.first());
Snapshot snapshot;
if (!QFileInfo(cplusplusDir, QLatin1String("AST.h")).exists()) {
std::cerr << "Cannot find AST.h in " << qPrintable(cplusplusDir.absolutePath())
<< std::endl;
return EXIT_FAILURE;
}
Snapshot snapshot;
QStringList astDerivedClasses = generateAST_H(snapshot, cplusplusDir);
astDerivedClasses.sort();
generateASTFwd_h(snapshot, cplusplusDir, astDerivedClasses);