summaryrefslogtreecommitdiffstats
path: root/src/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* cmake: drop explicit link to version.lib on WindowsBrad King2019-03-111-3/+0
| | | | | | | | | | Since commit 9c91919574 (cmake: work with LLVM_LINK_LLVM_DYLIB, 2019-01-17) our `llvm_libs` variable is a list of LLVM components rather than a list of raw library names. The `version.lib` library is not a LLVM component. Fortunately we can simply drop it because LLVM now computes the proper list of libraries for its components. Fixes: #133
* cmake: work with LLVM_LINK_LLVM_DYLIBDan McGregor2019-01-171-5/+7
| | | | Support linking against the shared version of LLVM libraries.
* Drop KWSys since we no longer use any componentsBrad King2017-02-231-1/+0
|
* Add explicit include directory for configured Version.hBrad King2017-02-231-0/+2
| | | | Do not depend on getting it from `KWSYS_HEADER_ROOT`.
* Port to LLVM/Clang SVN r280011 (trunk) and 3.9Brad King2016-08-311-0/+3
| | | | | | | | | Since LLVM/Clang SVN r275507 (Frontend: Simplify ownership model for clang's output streams, 2016-07-15) the createDefaultOutputFile method returns ownership of the stream via unique_ptr. Also on Windows we now must link to `version.lib` because LLVM/Clang now uses the GetFileVersionInfoW symbol.
* castxml: Link to LLVMSupport libraryBrad King2015-09-231-0/+1
| | | | | | | | We include LLVM support headers and use the APIs, so we should link to the corresponding library directly instead of depending on a transitive dependency through other libraries we use. GitHub-Issue: 30
* Port to LLVM/Clang SVN r215430 (release_35)Brad King2014-08-121-1/+1
| | | | | | Use std::error_code instead of llvm::error_code. Use std::unique_ptr instead of llvm::OwningPtr. Use llvm_map_components_to_libnames instead of llvm_map_components_to_libraries.
* castxml: Register all LLVM target architectures and asm parsersBrad King2014-04-101-1/+6
| | | | | We need as parsers to support Visual Studio system header files that contain inline assembly.
* castxml: Report version number with '--version'Brad King2014-03-241-0/+5
| | | | Also pass the flag through so Clang reports its version too.
* Set up Clang AST visitor infrastructure for XML outputBrad King2014-02-261-0/+1
| | | | | | | | | | | | | | | | | | Create an API to perform the AST walk and XML output generation. Create a queue that can hold both clang::Decl and clang::QualType nodes. Add the main translation unit Decl to the queue. Follow the queue until empty while adding new nodes to the queue only if they represent complete types or declarations. Then queue the incomplete nodes and follow the queue again until empty. This will allow all complete class types to be output as needed followed by types that are referenced but do not need complete output (like a pointed-to type). Use "clang/AST/DeclNodes.inc" and "clang/AST/TypeNodes.def" to dispatch visitation to a method dedicated to each AST node kind/type-class. Use a visitor base class to provide an implementation for every visitation method that simply reports the node as Unimplemented. This will allow us to incrementally implement output for each AST node.
* Make Clang resources available to our driverBrad King2014-02-261-0/+5
| | | | | | Make the Clang resources available to CastXML. From the build tree simply find and reference the resources installed with Clang. Install the resources in our own resource directory for re-distribution.
* Add API to run Clang internallyBrad King2014-02-261-0/+15
| | | | | | | | | | | | | | | | | | | | | 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-0/+1
| | | | | | 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/+1
| | | | | | | 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.
* Compute resource directory on startupBrad King2014-02-141-1/+13
| | | | | | Add a findResourceDir function to locate resources relative to the executable location at the start of main and a getResourceDir function to lookup the result later.
* Configure binary output and install directoriesBrad King2014-02-141-1/+1
| | | | | | Store runtime binaries in 'bin' and libraries in 'lib'. Install runtime binaries to '<prefix>/bin' by default and data files to '<prefix>/share/castxml' by default.
* Link castxml to LLVM librariesBrad King2014-02-141-0/+3
| | | | | | Build with -fno-rtti on GNU and Clang compilers to match LLVM. Find the LLVM package and link to the native, option, and bitreader components.
* Add castxml executableBrad King2014-02-141-0/+21
Load command line arguments through KWSys Encoding. Install the executable to 'bin/castxml'.