diff options
Diffstat (limited to 'cpp/src/slice2cpp/Main.cpp')
-rw-r--r-- | cpp/src/slice2cpp/Main.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index cdbefe44792..6e181a6c429 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -174,10 +174,31 @@ main(int argc, char* argv[]) if(depend) { Preprocessor icecpp(argv[0], *i, cppArgs); + FILE* cppHandle = icecpp.preprocess(false); + + if(cppHandle == 0) + { + return EXIT_FAILURE; + } + + UnitPtr u = Unit::createUnit(false, false, ice, caseSensitive); + int parseStatus = u->parse(*i, cppHandle, debug); + u->destroy(); + + if(parseStatus == EXIT_FAILURE) + { + return EXIT_FAILURE; + } + if(!icecpp.printMakefileDependencies(Preprocessor::CPlusPlus, includePaths, sourceExtension)) { return EXIT_FAILURE; } + + if(!icecpp.close()) + { + return EXIT_FAILURE; + } } else { |