Skip to content

FetchContent solution for mcstas-chopper-lib from Greg Tucker - #2631

Merged
willend merged 1 commit into
mainfrom
chopper-lib-fetch-integration
Sep 8, 2026
Merged

willend merged 1 commit into
mainfrom
chopper-lib-fetch-integration

Conversation

@willend

@willend willend commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Free-form text area

Please describe what your PR is adding in terms of features or bugfixes:

@g5t has developed a nice solution for ESS source <-> new chopper-lib interplay. This PR adds chopper-lib to mcstas via CMake FetcContent


Declaration of use of AI-tools

  • Please add a checkmark here if you used AI-tools during the work for this contribution
  • Furter, please describe how / where and for what the tools were used:

Claude, my prompt:

My McCode (McStas/McXtrace) checkout in (...) is available to you via an MCP plugin.

The codes are built using CMake - and we are gradually moving to mainly focusing on conda-forge as distribution channel, the McStas recipe is found here:
https://github.com/conda-forge/mcstas-suite-feedstock

I would like to integrate this new library from Greg Tucker which is placed in an independent repo https://github.com/mcdotstar/mcstas-chopper-lib. I would like an automated solution that works at release / config / build time rather than a static import. 

The chopper-lib comes with both 'lib' code (.c/.h snippets) that should end up in the users McStas resource dir 'share', components that should end up in the users McStas resource 'contrib' dir and instruments  should end up in independent folders under the users McStas resource 'examples/Tests_optics' dir.

Please initially take a look at the CMake code in the McStas checkout and investigate 1) if we require a new enough CMake for using FetchContent and 2) how you would propose implementing the wanted mechanism to automatically fetch the mcstas-chopper-lib for distribution / installation


Development OS / boundary conditions

Please describe what OS you developed and tested your additions on, and if any special dependencies are required:


PR Checklist for contributing to McStas/McXtrace

For a coherent and useful contribution to McStas/McXtrace, please fill in relevant parts of the checklist:

  • My contribution contains something else

    • Explanation is added in free form text above or below the checklist

@willend
willend merged commit 7bd422f into main Sep 8, 2026
26 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.

1 participant