From 8c9f9660f04d1c5e462f6a815329bffa90327618 Mon Sep 17 00:00:00 2001 From: Marcelo Lira Date: Wed, 16 Feb 2011 07:59:36 -0300 Subject: Added the "--drop-type-entries=" command line option. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The documentation was updates on this and older things. Reviewed by Bruno Araújo Reviewed by Luciano Wolf --- CMakeLists.txt | 2 +- data/generatorrunner.1 | 14 ++++++++------ doc/commandlineoptions.rst | 8 +++++++- main.cpp | 4 ++++ 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 926012d2a..d6615e74b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ project(generatorrunner) cmake_minimum_required(VERSION 2.6) find_package(Qt4 4.5.0 REQUIRED) -find_package(ApiExtractor 0.9.5 REQUIRED) +find_package(ApiExtractor 0.10.0 REQUIRED) option(BUILD_TESTS "Build tests." TRUE) option(INSTALL_TESTS "Install tests" FALSE) diff --git a/data/generatorrunner.1 b/data/generatorrunner.1 index 072d373a1..045b55ad4 100644 --- a/data/generatorrunner.1 +++ b/data/generatorrunner.1 @@ -2,14 +2,13 @@ .SH NAME generatorrunner - plugin-based binding source code generator .SH SYNOPSIS -.B generatorrunner \-\-generatorSet= [options] header-file typesystem-file -.B ... +.B generatorrunner \-\-generator-set= [options] header-file typesystem-file .SH DESCRIPTION .B generatorrunner is a utility that uses the information taken from APIExtractor related to the provided C++ headers and typesystem files and execute generators using this information. Generators are plugins and you need -to specify one using the \-\-generatorSet parameter. At the moment there +to specify one using the \-\-generator-set parameter. At the moment there are two generators available: .B qtdoc @@ -18,7 +17,7 @@ are two generators available: documentation syntax, using the XML files created by the documentation tool .B (qdoc3). Can be called supplying -.B \-\-generatorSet=qtdoc +.B \-\-generator-set=qtdoc to .B generatorrunner or by calling the convenience executable @@ -33,12 +32,15 @@ architecture and current limitations, refer to http://www.pyside.org/home-bindin .SH OPTIONS .SS "General options" +.IP \-\-api-version= +Specify the supported api version used to generate the bindings. .IP \-\-debug-level=[sparse|medium|full] The amount of messages displayed. .IP \-\-documentation-only Only generates the documentation. -.TP -.BI \-\-help \fR,\fP \-h \fR,\fP -? +.IP \-\-drop-type-entries="[;TypeEntry1;...]" +Semicolon separated list of type system entries (classes, namespaces, global functions and enums) to be dropped from generation. +.IP \-\-help \fR,\fP \-h \fR,\fP -? Prints the usage message. .IP \-\-project-file= Text file containing a description of the binding project. Replaces and overrides command line arguments. diff --git a/doc/commandlineoptions.rst b/doc/commandlineoptions.rst index 0761982d4..7cc829deb 100644 --- a/doc/commandlineoptions.rst +++ b/doc/commandlineoptions.rst @@ -16,7 +16,7 @@ Options .. _api-version: -``--api-version`` +``--api-version=`` Specify the supported api version used to generate the bindings. .. _debug-level: @@ -29,6 +29,12 @@ Options ``--documentation-only`` Do not generate any code, just the documentation. +.. _drop-type-entries: + +``--drop-type-entries="[;TypeEntry1;...]"`` + Semicolon separated list of type system entries (classes, namespaces, + global functions and enums) to be dropped from generation. + .. _generation-set: ``--generation-set`` diff --git a/main.cpp b/main.cpp index 1e4e65fe8..804faf7d1 100644 --- a/main.cpp +++ b/main.cpp @@ -181,6 +181,7 @@ void printUsage(const GeneratorList& generators) generalOptions.insert("version", "Output version information and exit"); generalOptions.insert("generator-set=<\"generator module\">", "generator-set to be used. e.g. qtdoc"); generalOptions.insert("api-version=<\"version\">", "Specify the supported api version used to generate the bindings"); + generalOptions.insert("drop-type-entries=\"[;TypeEntry1;...]\"", "Semicolon separated list of type system entries (classes, namespaces, global functions and enums) to be dropped from generation."); printOptions(s, generalOptions); foreach (Generator* generator, generators) { @@ -296,6 +297,9 @@ int main(int argc, char *argv[]) if (args.contains("api-version")) extractor.setApiVersion(args["api-version"].toDouble()); + if (args.contains("drop-type-entries")) + extractor.setDropTypeEntries(args["drop-type-entries"]); + if (args.contains("typesystem-paths")) extractor.addTypesystemSearchPath(args.value("typesystem-paths").split(PATH_SPLITTER)); if (!args.value("include-paths").isEmpty()) -- cgit v1.2.3