Skip to content

COMP: Stop setting deprecated EXECUTABLE_OUTPUT_PATH/LIBRARY_OUTPUT_PATH for GDCM#6557

Merged
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:release-5.4from
thewtex:gdcm-release-warnings
Jul 7, 2026
Merged

COMP: Stop setting deprecated EXECUTABLE_OUTPUT_PATH/LIBRARY_OUTPUT_PATH for GDCM#6557
hjmjohnson merged 1 commit into
InsightSoftwareConsortium:release-5.4from
thewtex:gdcm-release-warnings

Conversation

@thewtex

@thewtex thewtex commented Jul 6, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the CMake configure-time deprecation warnings reported in #6551, which appear on release-5.4 (RTK nightly builds, Linux and Windows) but not on main:

CMake Warning at Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt:...
  EXECUTABLE_OUTPUT_PATH is deprecated. Use CMAKE_RUNTIME_OUTPUT_DIRECTORY instead.

CMake Warning at Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt:...
  LIBRARY_OUTPUT_PATH is deprecated. Use CMAKE_LIBRARY_OUTPUT_DIRECTORY and
  CMAKE_ARCHIVE_OUTPUT_DIRECTORY instead.

Root cause

The warnings are emitted by the vendored Modules/ThirdParty/GDCM/src/gdcm/CMakeLists.txt, whose newer compatibility shim warns whenever the legacy EXECUTABLE_OUTPUT_PATH / LIBRARY_OUTPUT_PATH variables are set:

if(EXECUTABLE_OUTPUT_PATH)
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
  message(WARNING "EXECUTABLE_OUTPUT_PATH is deprecated. ...")
endif()
if(LIBRARY_OUTPUT_PATH)
  ...
  message(WARNING "LIBRARY_OUTPUT_PATH is deprecated. ...")
endif()

They are triggered by ITK's own wrapper one level up, Modules/ThirdParty/GDCM/src/CMakeLists.txt, which set both deprecated variables in the parent scope immediately before add_subdirectory(gdcm):

# GDCM uses these to refer to executable and library locations
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
set(LIBRARY_OUTPUT_PATH ${CMAKE_LIBRARY_OUTPUT_DIRECTORY})

The src/gdcm/ subtree portion of the shim landed on release-5.4 via the GDCM upstream update in #6059, but the corresponding wrapper cleanup was never backported — so on release-5.4 the shim sees the variables set and warns, while main (which already dropped these set() calls) is silent.

Fix

Backport of commit d5cf8de ("ENH: Conform GDCM to use CMAKE_*OUTPUT_DIRECTORY"), applying only the src/CMakeLists.txt wrapper hunk — removing the two set() calls. The src/gdcm/CMakeLists.txt portion of that commit is already present on release-5.4 (verified byte-identical), so it is intentionally omitted to avoid disturbing the vendored update.

With the wrapper no longer setting the legacy variables, the vendored shim's if() guards are false and the two message(WARNING ...) calls no longer fire. The vendored GDCM CMake still derives EXECUTABLE_OUTPUT_PATH / LIBRARY_OUTPUT_PATH internally from CMAKE_RUNTIME_OUTPUT_DIRECTORY / CMAKE_LIBRARY_OUTPUT_DIRECTORY / CMAKE_ARCHIVE_OUTPUT_DIRECTORY for its own use, so build output locations are unchanged.

This is a configuration-only change; no C++ is affected.

Fixes #6551.

🤖 Generated with Claude Code

Add GDCM support for modern CMAKE_*_OUTPUT_DIRECTORY
variables. Removes setting legacy CMake cache variables.

Internlly GDCM still uses the legacy names.

Backport to release-5.4: only the src/CMakeLists.txt wrapper hunk is
applied. The src/gdcm/CMakeLists.txt portion of the original commit
already landed on release-5.4 via the GDCM upstream update (PR InsightSoftwareConsortium#6059),
so its compatibility shim was emitting deprecation warnings because the
wrapper kept setting EXECUTABLE_OUTPUT_PATH / LIBRARY_OUTPUT_PATH.
Removing those set() calls fixes the CMake deprecation warnings reported
in issue InsightSoftwareConsortium#6551.

(cherry picked from commit d5cf8de)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots area:ThirdParty Issues affecting the ThirdParty module labels Jul 6, 2026
@greptile-apps

greptile-apps Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes deprecated GDCM CMake output variable assignments from ITK’s wrapper. The main changes are:

  • Stops setting EXECUTABLE_OUTPUT_PATH before add_subdirectory(gdcm).
  • Stops setting LIBRARY_OUTPUT_PATH before add_subdirectory(gdcm).
  • Lets vendored GDCM derive its internal legacy paths from modern CMAKE_*_OUTPUT_DIRECTORY values.

Confidence Score: 5/5

Safe to merge with minimal risk.

The change is a small CMake wrapper cleanup that aligns with the vendored GDCM compatibility logic and does not affect C++ code or build targets beyond removing deprecated variable inputs.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex ran the requested verification, but its local artifact references were not uploaded.

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
Modules/ThirdParty/GDCM/src/CMakeLists.txt Removes legacy GDCM wrapper assignments for EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH; no functional issues found.

Reviews (1): Last reviewed commit: "ENH: Conform GDCM to use CMAKE_*OUTPUT_D..." | Re-trigger Greptile

@thewtex thewtex requested review from SimonRit and blowekamp July 6, 2026 18:30
@thewtex thewtex added this to the ITK 5.4.7 milestone Jul 6, 2026
@hjmjohnson hjmjohnson merged commit 0411db4 into InsightSoftwareConsortium:release-5.4 Jul 7, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ThirdParty Issues affecting the ThirdParty module type:Compiler Compiler support or related warnings type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants