summaryrefslogtreecommitdiffstats
path: root/src/Options.h
Commit message (Collapse)AuthorAgeFilesLines
* Revise C++ coding style using clang-formatKitware Robot2016-11-101-5/+15
| | | | | | | | | | | | | Run the `src/clang-format.bash` script to update all our C and C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. Fix expected test output for new line numbers. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
* RunClang: Detect C and C++ std level from --castxml-cc-<id>Brad King2015-09-181-1/+3
| | | | | | | | If no -std= option is explicitly given then parse the __cplusplus or __STDC_VERSION__ preprocessor definition from the compiler output and add the corresponding -std= flag. For MSVC we need to map _MSC_VER to -std= ourselves because the compiler does not define __cplusplus to standard values and each version hard-codes its C++ standard level.
* Include KWSys Configure.h instead of Configure.hxxBrad King2015-08-201-1/+1
| | | | We do not need any of the settings from the latter.
* castxml: Allow -target option to override --castxml-cc-<id> detectionBrad King2015-05-281-1/+2
| | | | | | | If the command line contains an explicit '-target' option then do not consider the target platform detected from any --castxml-cc-<id> option. Instead simply honor the explicitly requested target. This will be particularly helpful for targets that CastXML has not learned to detect.
* Detect: Recognize framework include directories on OS XBrad King2014-04-161-1/+7
| | | | | | | | Some OS X compilers report their framework include directories with an explicit suffix in "-v" output. Others report without an explicit suffix but the paths imply they are for frameworks by ending in "/Frameworks". Recognize either suffix and remove the explicit suffix. Add framework directories with "-iframework" instead of "-isystem".
* Add --castxml-start option to specify traversal rootsBrad King2014-02-261-0/+1
| | | | | Add an option to specify the starting declarations from which traversal of the translation unit should start.
* Add API to run Clang internallyBrad King2014-02-261-1/+3
| | | | | | | | | | | | | | | | | | | | | Use the Clang Driver API to construct an invocation of Clang like the main "clang" compiler tool would for syntax-only or preprocess-only actions. Add two front-end actions, one for the '-E' preprocess-only option and one for our syntax-only AST traversal. Implement a syntax-only action that falls back to the Clang syntax-only action unless xml output is requested. Leave xml output unimplemented for now. Capture the '-o <output-file>' option ourselves since the Clang Driver API will ignore it when using a syntax-only action. Forward it to the compiler invocation frontend options just before constructing the frontend action implementation. When '--castxml-cc-<id>' is given tell the driver to suppress its own standard include path detection. Give the driver options to configure it to match the detected target triple and header search path. Tell it to suppress its builtin definitions. Hook in to the front-end action for each input source file to put the detected predefines into the preprocessor configuration.
* Add --castxml-cc-<id> option to specify compiler commandBrad King2014-02-141-1/+9
| | | | | | Add members to the Options struct to hold the preprocessor and target settings detected from a given compiler command. Add an API to fill in the members.
* Add initial command-line parsingBrad King2014-02-141-0/+25
Use "--castxml-" prefix on all CastXML options to distinguish them from options to Clang. Create an "Options" struct to hold settings to be passed to the implementation later. Add a "--castxml-gccxml" option to enable xml output in a gccxml-compatible format.