Skip to content

COMP: prefix CMake check commands with DCMTK_ to avoid leaking - #2

Merged
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:for/itk-dcmtk-3.7.0-ccfd10bfrom
blowekamp:use_dcmtk_override
Jun 22, 2026
Merged

COMP: prefix CMake check commands with DCMTK_ to avoid leaking#2
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:for/itk-dcmtk-3.7.0-ccfd10bfrom
blowekamp:use_dcmtk_override

Conversation

@blowekamp

Copy link
Copy Markdown
Member

CHECK_FUNCTION_EXISTS (Windows override) and CHECK_CXX_SYMBOL_EXISTS (fallback) were defined as global CMake commands. When DCMTK is built via FetchContent inside another project, these overrides leaked into sibling modules and caused incorrect feature detection.

Renamed to DCMTK_CHECK_FUNCTION_EXISTS and DCMTK_CHECK_CXX_SYMBOL_EXISTS and updated all call sites.

CHECK_FUNCTION_EXISTS (Windows override) and CHECK_CXX_SYMBOL_EXISTS
(fallback) were defined as global CMake commands. When DCMTK is built
via FetchContent inside another project, these overrides leaked into
sibling modules and caused incorrect feature detection.

Renamed to DCMTK_CHECK_FUNCTION_EXISTS and DCMTK_CHECK_CXX_SYMBOL_EXISTS
and updated all call sites.

@hjmjohnson hjmjohnson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Will you make an upstream PR for this after testing?

@hjmjohnson
hjmjohnson merged commit 4ac9b44 into InsightSoftwareConsortium:for/itk-dcmtk-3.7.0-ccfd10b Jun 22, 2026
@blowekamp

Copy link
Copy Markdown
Member Author

PR made for upstream DCMTK#153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants