summaryrefslogtreecommitdiff
path: root/cpp/src/slice2freezej/Main.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2012-01-03 21:41:21 +0100
committerJose <jose@zeroc.com>2012-01-03 21:41:21 +0100
commitfcbad2aa2fae8226d3f59bd12ae0554a8bc38fe0 (patch)
treec8d64ad55c3cd37ef6a5e2d697664acb02e19069 /cpp/src/slice2freezej/Main.cpp
parentICE-4761 ice VS 2010 plugin failure (diff)
downloadice-fcbad2aa2fae8226d3f59bd12ae0554a8bc38fe0.tar.bz2
ice-fcbad2aa2fae8226d3f59bd12ae0554a8bc38fe0.tar.xz
ice-fcbad2aa2fae8226d3f59bd12ae0554a8bc38fe0.zip
ICE-4744 Eclipse plugin: build failure when slice2java generates warning
- add --depend-xml option to slice2freezej - update ant tasks to use --depend-xml instead of --depend
Diffstat (limited to 'cpp/src/slice2freezej/Main.cpp')
-rwxr-xr-xcpp/src/slice2freezej/Main.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/cpp/src/slice2freezej/Main.cpp b/cpp/src/slice2freezej/Main.cpp
index a31d935482b..626ddf3a044 100755
--- a/cpp/src/slice2freezej/Main.cpp
+++ b/cpp/src/slice2freezej/Main.cpp
@@ -1456,6 +1456,7 @@ usage(const char* n)
" is sensitive).\n"
"--output-dir DIR Create files in the directory DIR.\n"
"--depend Generate Makefile dependencies.\n"
+ "--depend-xml Generate dependencies in XML format.\n"
"-d, --debug Print debug messages.\n"
"--ice Permit `Ice' prefix (for building Ice source code only).\n"
"--underscore Permit underscores in Slice identifiers.\n"
@@ -1479,6 +1480,7 @@ compile(int argc, char* argv[])
opts.addOpt("", "dict-index", IceUtilInternal::Options::NeedArg, "", IceUtilInternal::Options::Repeat);
opts.addOpt("", "output-dir", IceUtilInternal::Options::NeedArg);
opts.addOpt("", "depend");
+ opts.addOpt("", "depend-xml");
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
opts.addOpt("", "underscore");
@@ -1734,6 +1736,7 @@ compile(int argc, char* argv[])
string output = opts.optArg("output-dir");
bool depend = opts.isSet("depend");
+ bool dependxml = opts.isSet("depend-xml");
bool debug = opts.isSet("debug");
@@ -1758,10 +1761,15 @@ compile(int argc, char* argv[])
IceUtil::CtrlCHandler ctrlCHandler;
ctrlCHandler.setCallback(interruptedCallback);
+
+ if(dependxml)
+ {
+ cout << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<dependencies>" << endl;
+ }
for(vector<string>::size_type idx = 0; idx < args.size(); ++idx)
{
- if(depend)
+ if(depend || dependxml)
{
PreprocessorPtr icecpp = Preprocessor::create(argv[0], args[idx], cppArgs);
FILE* cppHandle = icecpp->preprocess(false);
@@ -1780,7 +1788,7 @@ compile(int argc, char* argv[])
return EXIT_FAILURE;
}
- if(!icecpp->printMakefileDependencies(Preprocessor::Java, includePaths))
+ if(!icecpp->printMakefileDependencies(depend ? Preprocessor::Java : Preprocessor::JavaXML, includePaths))
{
u->destroy();
return EXIT_FAILURE;
@@ -1826,6 +1834,11 @@ compile(int argc, char* argv[])
return EXIT_FAILURE;
}
}
+
+ if(dependxml)
+ {
+ cout << "</dependencies>\n";
+ }
{
IceUtilInternal::MutexPtrLock<IceUtil::Mutex> sync(mutex);
@@ -1837,7 +1850,7 @@ compile(int argc, char* argv[])
}
}
- if(depend)
+ if(depend || dependxml)
{
u->destroy();
return EXIT_SUCCESS;