C-family Abstract Syntax Tree XML Output
Switch branches/tags
Nothing to show
Clone or download
bradking Detect: Add __STDCPP_DEFAULT_NEW_ALIGNMENT__ predefined VS macro
This macro is missing from the main MSVC predefined macro list but is
documented by [1] and [2].  Also add `__STDCPP_STRICT_POINTER_SAFETY__`
as documented by [2] in case MSVC ever starts defining it.

[1] https://docs.microsoft.com/en-us/cpp/build/reference/zc-alignednew
[2] https://en.cppreference.com/w/cpp/preprocessor/replace

Fixes: #125
Latest commit ae93121 Aug 6, 2018




CastXML is a C-family abstract syntax tree XML output tool.

This project is maintained by Kitware in support of ITK, the Insight Segmentation and Registration Toolkit.


See the castxml(1) manual page for instructions to run the tool.


CastXML is licensed under the Apache License, Version 2.0. See the LICENSE and NOTICE files for details.


Subscribe and post to the CastXML Mailing List for discussion of CastXML.


To build CastXML from source, first obtain the prerequisites:

  • A C++ compiler supporting the c++11 standard language level.
  • CMake cross-platform build system generator.
  • LLVM/Clang compiler SDK install tree built using the C++ compiler. This version of CastXML has been tested with LLVM/Clang
    • SVN revision 338041 (trunk)
    • Release 6.0
    • Release 5.0
    • Release 4.0
    • Release 3.9
    • Release 3.8
    • Release 3.7
    • Release 3.6
  • Optionally, the Sphinx documentation generator to build documentation.

Run CMake on the CastXML source tree to generate a build tree using a C++ compiler compatible with that used to build the LLVM/Clang SDK. CMake options include:

Location of the LLVM/Clang SDK. Set to <prefix>/lib/cmake/clang, where <prefix> is the top of the LLVM/Clang SDK install tree. Alternatively, LLVM_DIR may be set to <prefix>/lib/cmake/llvm.
Location of the sphinx-build executable. Required only if building documentation.
Build documentation in html format.
Build documentation in man format.

Run the corresponding native build tool (e.g. make) in the CastXML build tree, and optionally build the install target. The castxml command-line tool may be used either from the build tree or the install tree. The install tree is relocatable.