Skip to content
Snippets Groups Projects
Commit 644e1552 authored by Mathieu Westphal (Kitware)'s avatar Mathieu Westphal (Kitware) :zap: Committed by Kitware Robot
Browse files

Merge topic 'improve_spdx_doc'


b0d503dd Improve SPDX documentation

Acked-by: default avatarKitware Robot <kwrobot@kitware.com>
Acked-by: default avatarbuildbot <buildbot@kitware.com>
Merge-request: !10380
parents 4136c16d b0d503dd
No related merge requests found
......@@ -210,7 +210,7 @@ mark_as_advanced(VTK_ENABLE_CATALYST)
#-----------------------------------------------------------------------------
# Add an option to enable/disable SPDX generation
# Remove the "Experimental" once https://gitlab.kitware.com/vtk/vtk/-/issues/18999 is adressed
option(VTK_GENERATE_SPDX "Generate SPDX file for each module (Experimental)." OFF)
option(VTK_GENERATE_SPDX "Generate SPDX file for each module." OFF)
mark_as_advanced(VTK_GENERATE_SPDX)
include(vtkEncodeString)
......
......@@ -997,6 +997,12 @@ to all files that are not parsed during generation, it is used to generate `Pack
this in `vtk_module_build`) and expected field for [third parties](/developers_guide/git/thirdparty.md).
If provided, it is used as is for the `PackageDownloadLocation` SPDX field.
#### SPDX arguments in `vtk_module_add_module`
It is possible to specify a `SPDX_SKIP_REGEX` when adding a module in order
to skip specific file during [SPDX tags parsing](#spdx-tags-in-the-sources-files).
It is a python regex which is used to match with the filename of the source files.
#### Custom license support
If the VTK module contains a custom license that is not part of the [SPDX license list](https://spdx.org/licenses/)
......@@ -1027,10 +1033,7 @@ the `SPDX-License-Identifier` tag. Like this:
```
If a source file does not contain both `SPDX-FileCopyrightText` and `SPDX-License-Identifier`
tags, a CMake warning is reported.
TODO: It would be possible to add a dedicated tag to identify that a file should NOT be parsed for SPDX tags,
but it is not needed yet.
tags, a warning at build time is reported.
#### Limitations
......@@ -1049,4 +1052,4 @@ but it is not needed yet.
* Adding empty lines between `// SPDX-FileCopyrightText` and `// SPDX-License-Identifier`
tags is not supported.
* Only comments starting with `//` are considered.
* Certain files are not parsed at all, eg: cmake files, python files, test files, ...
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