diff options
-rw-r--r-- | icespider/compile/icespider.jam | 4 | ||||
-rw-r--r-- | icespider/compile/main.cpp | 1 | ||||
-rw-r--r-- | icespider/compile/routeCompiler.cpp | 5 | ||||
-rw-r--r-- | icespider/compile/routeCompiler.h | 1 |
4 files changed, 8 insertions, 3 deletions
diff --git a/icespider/compile/icespider.jam b/icespider/compile/icespider.jam index f165434..4513494 100644 --- a/icespider/compile/icespider.jam +++ b/icespider/compile/icespider.jam @@ -2,15 +2,17 @@ import type : register ; import generators : register-standard ; import type ; import toolset : flags ; +import feature : feature ; type.register JSON : json ; generators.register-standard icespider.routes2cpp : JSON : CPP(icespider-routes-%) H(icespider-routes-%) ; flags icespider.routes2cpp INCLUDES <include> ; +flags icespider.routes2cpp ALLOWICE <allow-ice>yes : --ice ; actions icespider.routes2cpp bind ICESPIDER { - icespider -I"$(INCLUDES)" $(2) $(1[1]) + icespider -I"$(INCLUDES)" $(ALLOWICE[1]) $(2) $(1[1]) } IMPORT $(__name__) : icespider.routes2cpp : : icespider.routes2cpp ; diff --git a/icespider/compile/main.cpp b/icespider/compile/main.cpp index 3d5311f..7be6579 100644 --- a/icespider/compile/main.cpp +++ b/icespider/compile/main.cpp @@ -14,6 +14,7 @@ main(int c, char ** v) ("input", po::value(&input), "Input .json file") ("output", po::value(&output), "Output .cpp file") ("include,I", po::value(&rc.searchPath)->composing(), "Search path") + ("ice", po::value(&rc.allowIcePrefix)->default_value(rc.allowIcePrefix)->zero_tokens(), "Allow reserved Ice prefix in Slice identifiers") ("help,h", po::value(&showHelp)->default_value(false)->zero_tokens(), "Help") ; po::positional_options_description pod; diff --git a/icespider/compile/routeCompiler.cpp b/icespider/compile/routeCompiler.cpp index 2cca195..5c89ee5 100644 --- a/icespider/compile/routeCompiler.cpp +++ b/icespider/compile/routeCompiler.cpp @@ -12,7 +12,8 @@ namespace IceSpider { namespace Compile { - RouteCompiler::RouteCompiler() + RouteCompiler::RouteCompiler() : + allowIcePrefix(false) { searchPath.push_back(boost::filesystem::current_path()); } @@ -204,7 +205,7 @@ namespace IceSpider { throw std::runtime_error("Preprocess failed"); } - Slice::UnitPtr u = Slice::Unit::createUnit(false, false, false, false); + Slice::UnitPtr u = Slice::Unit::createUnit(false, false, allowIcePrefix, false); uDestroy.onFailure.push_back([u]() { u->destroy(); }); int parseStatus = u->parse(realSlice.string(), cppHandle, false); diff --git a/icespider/compile/routeCompiler.h b/icespider/compile/routeCompiler.h index 9a2eb8f..dda8b3d 100644 --- a/icespider/compile/routeCompiler.h +++ b/icespider/compile/routeCompiler.h @@ -23,6 +23,7 @@ namespace IceSpider { void compile(const boost::filesystem::path & input, const boost::filesystem::path & output) const; std::vector<boost::filesystem::path> searchPath; + bool allowIcePrefix; private: typedef std::map<std::string, int> Proxies; |