summaryrefslogtreecommitdiff
path: root/cpp/src/FreezeScript
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2013-07-17 00:09:35 +0200
committerJose <jose@zeroc.com>2013-07-17 00:09:35 +0200
commit3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86 (patch)
tree26fa5dbd2ff580933dc28b90af40ba9e3ca6fe7b /cpp/src/FreezeScript
parentFixed ICE-5356 - Consider adding man pages for unix executables (diff)
downloadice-3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86.tar.bz2
ice-3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86.tar.xz
ice-3288f5190bafcf1d9a71bbef7cd0b7d287fb7b86.zip
Fixed ICE-5375 - Consider to add ICE_TRANSLATOR preprocessor macro
Diffstat (limited to 'cpp/src/FreezeScript')
-rw-r--r--cpp/src/FreezeScript/DumpDB.cpp2
-rw-r--r--cpp/src/FreezeScript/Util.cpp4
-rw-r--r--cpp/src/FreezeScript/Util.h2
-rw-r--r--cpp/src/FreezeScript/transformdb.cpp6
4 files changed, 8 insertions, 6 deletions
diff --git a/cpp/src/FreezeScript/DumpDB.cpp b/cpp/src/FreezeScript/DumpDB.cpp
index a31148abda5..ca011caedb0 100644
--- a/cpp/src/FreezeScript/DumpDB.cpp
+++ b/cpp/src/FreezeScript/DumpDB.cpp
@@ -343,7 +343,7 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
Slice::UnitPtr unit = Slice::Unit::createUnit(true, true, ice, underscore);
FreezeScript::Destroyer<Slice::UnitPtr> unitD(unit);
- if(!FreezeScript::parseSlice(appName, unit, slice, cppArgs, debug))
+ if(!FreezeScript::parseSlice(appName, unit, slice, cppArgs, debug, "-DICE_COMPILER=ICE_DUMPDB"))
{
return EXIT_FAILURE;
}
diff --git a/cpp/src/FreezeScript/Util.cpp b/cpp/src/FreezeScript/Util.cpp
index 52e72b956a0..6ba2715713a 100644
--- a/cpp/src/FreezeScript/Util.cpp
+++ b/cpp/src/FreezeScript/Util.cpp
@@ -170,7 +170,7 @@ FreezeScript::createEvictorSliceTypes(const Slice::UnitPtr& u)
bool
FreezeScript::parseSlice(const string& n, const Slice::UnitPtr& u, const vector<string>& files,
- const vector<string>& cppArgs, bool debug)
+ const vector<string>& cppArgs, bool debug, const std::string& extraArgs)
{
//
// Parse the Slice files.
@@ -179,7 +179,7 @@ FreezeScript::parseSlice(const string& n, const Slice::UnitPtr& u, const vector<
{
PreprocessorPtr icecpp = Preprocessor::create(n, *p, cppArgs);
- FILE* cppHandle = icecpp->preprocess(false);
+ FILE* cppHandle = icecpp->preprocess(false, extraArgs);
if(cppHandle == 0)
{
diff --git a/cpp/src/FreezeScript/Util.h b/cpp/src/FreezeScript/Util.h
index 67986f18515..47d4dc751ba 100644
--- a/cpp/src/FreezeScript/Util.h
+++ b/cpp/src/FreezeScript/Util.h
@@ -56,7 +56,7 @@ std::string typeToString(const Slice::TypePtr&);
bool ignoreType(const std::string&);
void createEvictorSliceTypes(const Slice::UnitPtr&);
bool parseSlice(const std::string&, const Slice::UnitPtr&, const std::vector<std::string>&,
- const std::vector<std::string>&, bool);
+ const std::vector<std::string>&, bool, const std::string&);
typedef std::map<std::string, Freeze::CatalogData> CatalogDataMap;
diff --git a/cpp/src/FreezeScript/transformdb.cpp b/cpp/src/FreezeScript/transformdb.cpp
index 09c870b2c78..c4c3f1fe002 100644
--- a/cpp/src/FreezeScript/transformdb.cpp
+++ b/cpp/src/FreezeScript/transformdb.cpp
@@ -436,14 +436,16 @@ run(const Ice::StringSeq& originalArgs, const Ice::CommunicatorPtr& communicator
Slice::UnitPtr oldUnit = Slice::Unit::createUnit(true, true, ice, underscore);
FreezeScript::Destroyer<Slice::UnitPtr> oldD(oldUnit);
- if(!FreezeScript::parseSlice(appName, oldUnit, oldSlice, oldCppArgs, debug))
+ if(!FreezeScript::parseSlice(appName, oldUnit, oldSlice, oldCppArgs, debug,
+ "-DICE_COMPILER=ICE_TRANSFORMDB"))
{
return EXIT_FAILURE;
}
Slice::UnitPtr newUnit = Slice::Unit::createUnit(true, true, ice, underscore);
FreezeScript::Destroyer<Slice::UnitPtr> newD(newUnit);
- if(!FreezeScript::parseSlice(appName, newUnit, newSlice, newCppArgs, debug))
+ if(!FreezeScript::parseSlice(appName, newUnit, newSlice, newCppArgs, debug,
+ "-DICE_COMPILER=ICE_TRANSFORMDB"))
{
return EXIT_FAILURE;
}