diff options
Diffstat (limited to 'TAO/CIAO/CIDLC/cidlc.cpp')
-rw-r--r-- | TAO/CIAO/CIDLC/cidlc.cpp | 52 |
1 files changed, 4 insertions, 48 deletions
diff --git a/TAO/CIAO/CIDLC/cidlc.cpp b/TAO/CIAO/CIDLC/cidlc.cpp index 1afeb08b859..aea178da6a5 100644 --- a/TAO/CIAO/CIDLC/cidlc.cpp +++ b/TAO/CIAO/CIDLC/cidlc.cpp @@ -78,7 +78,7 @@ using namespace CCF::CIDL; using namespace CCF::CIDL::SemanticGraph; int -main (int argc, char* argv[]) +ACE_TMAIN (int argc, ACE_TCHAR* argv[]) { try { @@ -187,37 +187,7 @@ main (int argc, char* argv[]) : static_cast<std::istream&> (std::cin); InputStreamAdapter isa (is); - - - // Extract preprocessor symbol definitions (-D). We are not - // interested in the values, just symbols. - // - CPP::Symbols symbols; - - for (CommandLine::OptionsIterator - i (cl.options_begin ()), e (cl.options_end ()); i != e; ++i) - { - if (i->name () == "D") - { - std::string def (i->value ()); - - // Get rid of '=value' in 'symbol=value' definitions. - // - std::size_t p (def.find ('=')); - if (p != std::string::npos) - symbols.insert (std::string (def, 0, p)); - else - symbols.insert (def); - } - else if (i->name ()[0] == 'D') - { - std::string opt (i->name ()); - std::string def (opt.begin () + 1, opt.end ()); - symbols.insert (def); - } - } - - CPP::Preprocessor pp (isa, symbols); + CPP::Preprocessor pp (isa); if (cl.get_value ("preprocess-only", false)) { @@ -262,7 +232,6 @@ main (int argc, char* argv[]) context.set ("file-path", file_path); context.set ("trace-semantic-action", cl.get_value ("trace-semantic-actions", false)); - context.set ("cpp-symbols", symbols); // Extract include search paths. @@ -273,29 +242,16 @@ main (int argc, char* argv[]) for (CommandLine::OptionsIterator i (cl.options_begin ()), e (cl.options_end ()); i != e; ++i) { - std::string path; - if (i->name () == "I") { - path = i->value (); + include_paths.push_back (fs::path (i->value (), fs::native)); } else if (i->name ()[0] == 'I') { std::string opt (i->name ()); - path = std::string (opt.begin () + 1, opt.end ()); - } - - try - { + std::string path (opt.begin () + 1, opt.end ()); include_paths.push_back (fs::path (path, fs::native)); } - catch (fs::filesystem_error const&) - { - cerr << "error: invalid filesystem path '" << path << "' " - << "provided with the -I option" << endl; - - return 1; - } } context.set ("include-search-paths", include_paths); |