Skip to content

Commit 9049dc4

Browse files
committed
ENH: Update CastXML command to use --castxml-output=1
Remove reliance on the "--castxml-gccxml" that does not support newer compilers. For example: LLVM PR 114788 switched libc++'s <cstddef> to use decltype() to define size_t. Any build using libc++ 21 or later will have this problem, not just those that get it via the macOS SDK.
1 parent 20684c3 commit 9049dc4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Wrapping/Generators/SwigInterface/igenerator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1948,7 +1948,10 @@ def main():
19481948
pygccxml.declarations.scopedef_t.ALLOW_EMPTY_MDECL_WRAPPER = True
19491949

19501950
pygccxml_config = pygccxml.parser.config.xml_generator_configuration_t(
1951-
xml_generator_path=options.castxml_path, xml_generator="castxml"
1951+
xml_generator_path=options.castxml_path,
1952+
xml_generator="castxml",
1953+
# Use castxml-output=1 to take advantage of the newer XML format
1954+
flags=["--castxml-output=1"],
19521955
)
19531956

19541957
submodule_names_list: list[str] = []

Wrapping/macro_files/itk_auto_load_submodules.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function(generate_castxml_commandline_flags)
205205
${xml_file}
206206
COMMAND
207207
${_build_env} ${_ccache_cmd} ${CASTXML_EXECUTABLE} -o ${xml_file}
208-
--castxml-gccxml ${_target} --castxml-start _wrapping_ ${_castxml_cc} -w
208+
--castxml-output=1 ${_target} --castxml-start _wrapping_ ${_castxml_cc} -w
209209
-c # needed for ccache to think we are not calling for link
210210
@${castxml_inc_file} ${cxx_file}
211211
VERBATIM

0 commit comments

Comments
 (0)