diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c9d3c87781fd5b0fbfbb9ffe1d4c8cd9a054468..be856885c78ad96ce304b5bf5b9bb4b4a25b842c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/Documentation/docs/api/cmake/ModuleSystem.md b/Documentation/docs/api/cmake/ModuleSystem.md index 8a3e91b4533f3125b9d85e25d4318df0d3fbd477..6a6bf5ad24c8473f3173cf084d405dd1e9ab8d93 100644 --- a/Documentation/docs/api/cmake/ModuleSystem.md +++ b/Documentation/docs/api/cmake/ModuleSystem.md @@ -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, ...