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

spdx: Fix generation failure on Windows by adding support for response files

This commit updates the "SPDX_generate_output.py" script to accept
response files as input source file specifications. The previous
implementation had a limitation of a maximum command length of 8191
characters on a Windows system (as documented in [1]), which led
to generation failures in some modules. By using response files for
specifying input files, this commit fixes the issue.

In particular, certain modules such as the one listed below
needed to accept input files beyond the 8191 limit:
- vtkCommonImplicitArrays
- vtkCommonDataModel
- vtkCommonCore
- vtkRenderingOpenGL2
- vtkInteractionWidgets

To demonstrate this, we list these modules and the length of their
"-spdx.Release.args" files using the commands shown below:

```
$ find . -type f -name "*-spdx.Release.args" | xargs wc -m | sort -n -r | tail +2 | head -n6
 52896 ./vtkCommonImplicitArrays-spdx.Release.args
 13542 ./vtkCommonDataModel-spdx.Release.args
 10576 ./vtkCommonCore-spdx.Release.args
  9783 ./vtkRenderingOpenGL2-spdx.Release.args
  9302 ./vtkInteractionWidgets-spdx.Release.args
  6592 ./vtkFiltersGeneral-spdx.Release.args
```

This listed was generated assuming the VTK source and build directories
are respectively located at "C:/VTK" and "C:/VTK-build".

This approach is similar to the one used for passing input files
to the Python wrapping tool (see `CMake/vtkModuleWrapPython.cmake`
that was originally implemented in 328d974b "ENH: Allow wrapping
tools to accept argument files.")

[1] https://learn.microsoft.com/en-us/troubleshoot/windows-client/shell-experience/command-line-string-limitation
parent d58ce2e1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment