BUG: Replace multi-line DESCRIPTION strings in 5 ingested itk-module.cmake#6220
Conversation
…cmake
Five recently-ingested remote modules used the historical pattern of
loading README.md content into a CMake DOCUMENTATION variable and
passing it to itk_module() via DESCRIPTION "${DOCUMENTATION}". The
multi-line README content contains markdown bullet syntax with
semicolons that CMake's argument-tokenizer treats as list separators,
which produces 'Unknown argument' configure-time warnings as the
itk_module() macro's argument parser reads the chunks as separate
tokens rather than a single description string.
Replace the README-loading pattern in these five modules with a
hardcoded one-line DESCRIPTION:
Modules/Filtering/RLEImage/itk-module.cmake
Modules/Filtering/SplitComponents/itk-module.cmake
Modules/IO/IOFDF/itk-module.cmake
Modules/IO/IOMeshMZ3/itk-module.cmake
Modules/IO/IOMeshSTL/itk-module.cmake
The README files themselves are unchanged and remain the canonical
source of human-readable module documentation. Other in-tree modules
still using the file(READ DOCUMENTATION) + DESCRIPTION "${DOCUMENTATION}"
pattern are out of scope for this PR; they may be migrated in
follow-ups so the corresponding itk_module() macro tweak (foreach IN
LISTS ARGN) can land cleanly.
77c477b to
fe40592
Compare
|
Force-pushed Why the macro change was droppedThe original PR also tweaked across every recently-ingested module's HeaderTest. Root cause: the The macro tweak can land cleanly only after every Verification
Local cmake 4.2.1 / gcc 13.3 / Ubuntu 24.04, full default modules enabled ( |
This comment was marked as resolved.
This comment was marked as resolved.
Replace the set(DOCUMENTATION "...") + DESCRIPTION "${DOCUMENTATION}"
indirection with a static one-liner literal.
itk_module() is a CMake macro, so ${ARGN} re-tokenizes its arguments
and list-splits any embedded ";". A future edit adding a semicolon or
"[" to the DOCUMENTATION string would silently produce spurious
"Unknown argument" AUTHOR_WARNINGs from CMake/ITKModuleMacros.cmake:111
on every configure (see PRs InsightSoftwareConsortium#6220, InsightSoftwareConsortium#6245).
The v4 ingestion pipeline (PR InsightSoftwareConsortium#6204) enforces this via
sanitize-history.py:patch_dynamic_description.
Replace the set(DOCUMENTATION "...") + DESCRIPTION "${DOCUMENTATION}"
indirection with a static one-liner literal.
itk_module() is a CMake macro, so ${ARGN} re-tokenizes its arguments
and list-splits any embedded ";". A future edit adding a semicolon or
"[" to the DOCUMENTATION string would silently produce spurious
"Unknown argument" AUTHOR_WARNINGs from CMake/ITKModuleMacros.cmake:111
on every configure (see PRs InsightSoftwareConsortium#6220, InsightSoftwareConsortium#6245).
The v4 ingestion pipeline (PR InsightSoftwareConsortium#6204) enforces this via
sanitize-history.py:patch_dynamic_description.
Replace the set(DOCUMENTATION "...") + DESCRIPTION "${DOCUMENTATION}"
indirection with a static one-liner literal.
itk_module() is a CMake macro, so ${ARGN} re-tokenizes its arguments
and list-splits any embedded ";". A future edit adding a semicolon or
"[" to the DOCUMENTATION string would silently produce spurious
"Unknown argument" AUTHOR_WARNINGs from CMake/ITKModuleMacros.cmake:111
on every configure (see PRs InsightSoftwareConsortium#6220, InsightSoftwareConsortium#6245).
The v4 ingestion pipeline (PR InsightSoftwareConsortium#6204) enforces this via
sanitize-history.py:patch_dynamic_description.
Drop the file(READ README.md DOCUMENTATION) preamble and replace
DESCRIPTION "${DOCUMENTATION}" with a static one-liner.
itk_module() is a CMake macro, so ARGN re-tokenizes its arguments and
list-splits any embedded ';' characters. The PolarTransform README
contains 4 semicolons, producing 4 spurious "Unknown argument"
AUTHOR_WARNINGs from CMake/ITKModuleMacros.cmake:111 on every
configure.
Same canonical fix applied in PR #6220 to RLEImage, SplitComponents,
IOFDF, IOMeshMZ3, IOMeshSTL; PolarTransform was missed because it
landed in parallel. The v4 ingestion pipeline (PR #6204) prevents
this regression via sanitize-history.py:patch_dynamic_description.
BUG: Fix CMake configure warnings from multi-line DESCRIPTION in itk_module()
Five recently-ingested modules (RLEImage, SplitComponents, IOFDF,
IOMeshMZ3, IOMeshSTL) produce
CMake Warning (dev): Unknown argumenton every configure because their
itk-module.cmakereads the archivalREADME.mdinto aDESCRIPTIONargument and the README containssemicolons and
[characters that CMake list expansion splits intospurious arguments.
Root cause
CMake/ITKModuleMacros.cmakeusedforeach(arg ${ARGN})to iterateover
itk_module()arguments. WhenDESCRIPTIONholds a multi-linestring with semicolons, CMake expands
${ARGN}and re-splits on;before iteration, so each semicolon-delimited fragment becomes a
separate loop element and hits the "Unknown argument" warning.
Two complementary fixes:
ITKModuleMacros.cmake—foreach(arg IN LISTS ARGN)iteratesthe actual list elements without re-splitting. This is a safety net
for any DESCRIPTION that contains semicolons.
Five
itk-module.cmakefiles — replace theget_filename_component / file(READ README.md DOCUMENTATION)preambleand
DESCRIPTION "${DOCUMENTATION}"with a static one-liner. Thearchival
README.md(a migration notice) is not meaningful moduledocumentation and should not be the source of CMake metadata.
Affected modules and CDash evidence
All 12 configure warnings on the latest Mac nightly build trace to
ITKModuleMacros.cmake:111viamessage(AUTHOR_WARNING "Unknown argument [${arg}]").[charsA companion fix to PR #6204 (
sanitize-history.py) addspatch_dynamic_description()so future ingests never introduce thepattern.