Skip to content

Use the TOPP tool macros exported by OpenMS - #6

Merged
timosachsenberg merged 1 commit into
mainfrom
use-exported-tool-macros
Dec 6, 2026
Merged

timosachsenberg merged 1 commit into
mainfrom
use-exported-tool-macros

Conversation

@timosachsenberg

Copy link
Copy Markdown
Contributor

Summary

cmake/topp_tool_macros.cmake was a copy of the TOPP tool macros of OpenMS, kept until the core exported them (OpenMS/OpenMS#11035). The OpenMS CMake package now installs them with the CLI layer as OpenMSToolMacros.cmake (install component cmake_cli). OpenMSConfig.cmake includes them when COMPONENTS CLI is requested, and cmake/find_openms.cmake already makes that request before src/ declares the tool.

  • Remove cmake/topp_tool_macros.cmake and its include() in CMakeLists.txt.
  • Remove openms_install_tool_registry() from cmake/install_macros.cmake. The exported macros provide it too. find_package(OpenMS) runs after install_macros.cmake is included, so the exported definition was already the one in use. It installs to the core's OPENMS_TOOL_REGISTRY_DESTINATION, which is share/OpenMS/TOOLS by default, the same as INSTALL_SHARE_DIR/TOOLS here.
  • cmake/find_openms.cmake: stop at configure time with a clear message if the OpenMS installation does not provide the macros.
  • Update the comment in src/tests/topp/check_tool_registry.cmake and the "Copied CMake" note in AGENTS.md. The class-test framework is exported now too ([BUILD] Export the class-test framework as package component TestFramework OpenMS#11048), and this repository has no class tests that would use it.

The registry output is unchanged: same format, same ordering.


Generated by Claude Code

cmake/topp_tool_macros.cmake was a copy of the TOPP tool macros of OpenMS,
kept until the core exported them (OpenMS/OpenMS#11035). The OpenMS CMake
package now installs them as OpenMSToolMacros.cmake with the CLI layer and
includes them on find_package(OpenMS COMPONENTS CLI), which
cmake/find_openms.cmake already does before src/ declares the tool.

Drop the copy, and the openms_install_tool_registry() of
cmake/install_macros.cmake: the exported macros provide that function too,
and since find_package() runs after install_macros.cmake is included, the
exported definition was already the one in use. Fail at configure time with
a clear message when the OpenMS installation does not provide the macros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149aXmaLwgm7kqfDpQXyQYf
@timosachsenberg
timosachsenberg marked this pull request as ready for review December 6, 2026 14:26
@timosachsenberg
timosachsenberg merged commit a94b8b8 into main Dec 6, 2026
3 of 4 checks passed
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