Skip to content
Snippets Groups Projects
Commit 56de4d00 authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin
Browse files

vtkWrapHierarchy: Use response file to fix windows build in large project

This commit updates the module to allow its usage in large project
like 3D Slicer where the list of other hierarchy files can be larger
8191 characters [1].

[1] https://support.microsoft.com/en-us/help/830473/command-prompt-cmd--exe-command-line-string-limitation

Thanks: David Gobbi <david.gobbi@gmail.com>
parent 42046a26
No related tags found
No related merge requests found
Pipeline #
......@@ -136,6 +136,16 @@ $<$<BOOL:$<TARGET_PROPERTY:${module_name},INCLUDE_DIRECTORIES>>:
endif()
endforeach()
# write wrapper-tool arguments to a file
set(_other_hierarchy_args )
foreach(hierarchy_file ${OTHER_HIERARCHY_FILES})
set(_other_hierarchy_args "${_other_hierarchy_args}\"${hierarchy_file}\"\n")
endforeach()
set(_other_hierarchy_args_file ${module_name}OtherHierarchyFiles.args)
string(STRIP "${_other_hierarchy_args}" CMAKE_CONFIGURABLE_FILE_CONTENT)
configure_file(${CMAKE_ROOT}/Modules/CMakeConfigurableFile.in
${_other_hierarchy_args_file} @ONLY)
# Ninja does not wait for order-only dependencies before enforcing the
# existence of explicit dependencies that those order-only dependencies
# might have produced. Specify the real output to help it out.
......@@ -151,7 +161,7 @@ $<$<BOOL:$<TARGET_PROPERTY:${module_name},INCLUDE_DIRECTORIES>>:
COMMAND ${VTK_WRAP_HIERARCHY_EXE}
@${_args_file} -o ${OUTPUT_DIR}/${module_name}Hierarchy.txt
${module_name}Hierarchy.data
${OTHER_HIERARCHY_FILES}
@${_other_hierarchy_args_file}
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_CURRENT_BINARY_DIR}/${module_name}Hierarchy.stamp.txt
COMMENT "For ${module_name} - updating ${module_name}Hierarchy.txt"
DEPENDS ${VTK_WRAP_HIERARCHY_EXE}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment