[ 
https://issues.apache.org/jira/browse/THRIFT-2790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16479644#comment-16479644
 ] 

ASF GitHub Bot commented on THRIFT-2790:
----------------------------------------

bufferoverflow closed pull request #782: THRIFT-2790 thrift -gen all => an 
option to generate all languages an…
URL: https://github.com/apache/thrift/pull/782
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/compiler/cpp/src/main.cc b/compiler/cpp/src/main.cc
index 1b3b633f73..0b51866ada 100644
--- a/compiler/cpp/src/main.cc
+++ b/compiler/cpp/src/main.cc
@@ -1129,7 +1129,18 @@ int main(int argc, char** argv) {
           fprintf(stderr, "Missing generator specification\n");
           usage();
         }
-        generator_strings.push_back(arg);
+
+        // -gen all option to easily test compatibility of an idl
+        if (strcmp(arg, "all") == 0) {
+                     t_generator_registry::gen_map_t gen_map = 
t_generator_registry::get_generator_map();
+          t_generator_registry::gen_map_t::iterator iter;
+                     for (iter = gen_map.begin(); iter != gen_map.end(); 
++iter) {
+            
generator_strings.push_back(iter->second->get_short_name().c_str());
+                     }
+        }
+        else {
+          generator_strings.push_back(arg);
+        }
       } else if (strcmp(arg, "-I") == 0) {
         // An argument of "-I\ asdf" is invalid and has unknown results
         arg = argv[++i];


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> thrift -gen all => an option to generate all languages and features
> -------------------------------------------------------------------
>
>                 Key: THRIFT-2790
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2790
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General), Documentation, Test Suite
>            Reporter: Roger Meier
>            Priority: Major
>         Attachments: 
> 0001-THRIFT-2790-gen-all-option-to-easily-test-compatibil.patch, 
> generate-all-languages.bat
>
>
> I would like to have a *thrift -gen all* option to generate everything we 
> have in one step. This would allow proper testing of all compiler changes by 
> using  test/ThriftTest.thrift. An optional make check target could compare 
> different versions based on their git hash or to previous gen-all.backup 
> folder.
> Suggested-by: Roger Meier <ro...@apache.org>



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to