diff options
author | Jose <jose@zeroc.com> | 2017-02-03 18:54:14 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2017-02-03 18:54:14 +0100 |
commit | 75de6845e9869fa5842f2c5da4706f578f77080e (patch) | |
tree | 503b41562128d862fe75ca591468f1e4960ae357 /cpp/src/slice2cpp | |
parent | Rework warning suppression to use global meta data (diff) | |
download | ice-75de6845e9869fa5842f2c5da4706f578f77080e.tar.bz2 ice-75de6845e9869fa5842f2c5da4706f578f77080e.tar.xz ice-75de6845e9869fa5842f2c5da4706f578f77080e.zip |
Fixed (ICE-7556) - header-ext and makefile dependencies
Diffstat (limited to 'cpp/src/slice2cpp')
-rw-r--r-- | cpp/src/slice2cpp/Main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/cpp/src/slice2cpp/Main.cpp b/cpp/src/slice2cpp/Main.cpp index 7378da1b118..ebc2d08b8f3 100644 --- a/cpp/src/slice2cpp/Main.cpp +++ b/cpp/src/slice2cpp/Main.cpp @@ -266,6 +266,17 @@ compile(const vector<string>& argv) UnitPtr u = Unit::createUnit(false, false, ice, underscore); int parseStatus = u->parse(*i, cppHandle, debug); + + string ext = headerExtension; + static const string headerExtPrefix = "cpp:header-ext:"; + DefinitionContextPtr dc = u->findDefinitionContext(u->topLevelFile()); + assert(dc); + string meta = dc->findMetaData(headerExtPrefix); + if(meta.size() > headerExtPrefix.size()) + { + ext = meta.substr(headerExtPrefix.size()); + } + u->destroy(); if(parseStatus == EXIT_FAILURE) @@ -274,7 +285,7 @@ compile(const vector<string>& argv) } if(!icecpp->printMakefileDependencies(os, depend ? Preprocessor::CPlusPlus : Preprocessor::SliceXML, - includePaths, "-D__SLICE2CPP__", sourceExtension, headerExtension)) + includePaths, "-D__SLICE2CPP__", sourceExtension, ext)) { return EXIT_FAILURE; } |