Skip to content

Add CMake example#2731

Open
pavelzw wants to merge 2 commits intoconda-forge:mainfrom
pavelzw:cmake
Open

Add CMake example#2731
pavelzw wants to merge 2 commits intoconda-forge:mainfrom
pavelzw:cmake

Conversation

@pavelzw
Copy link
Member

@pavelzw pavelzw commented Jan 30, 2026

PR Checklist:

  • note any issues closed by this PR with closing keywords
  • if you are adding a new page under docs/ or community/, you have added it to the sidebar in the corresponding _sidebar.json file
  • put any other relevant information below

@netlify
Copy link

netlify bot commented Jan 30, 2026

Deploy Preview for conda-forge-previews ready!

Name Link
🔨 Latest commit 373d7ff
🔍 Latest deploy log https://app.netlify.com/projects/conda-forge-previews/deploys/697ce1eccccbe80008e54f3d
😎 Deploy Preview https://deploy-preview-2731--conda-forge-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 80
Accessibility: 96
Best Practices: 100
SEO: 89
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@pavelzw pavelzw marked this pull request as ready for review January 30, 2026 16:52
@pavelzw pavelzw requested a review from a team as a code owner January 30, 2026 16:52
Comment on lines +19 to +46
build:
number: 0
script:
content:
- if: unix
then:
- cmake -B build -GNinja $CMAKE_ARGS .
else:
- cmake -B build -GNinja %CMAKE_ARGS% .
- cmake --build build
- cmake --install build

requirements:
build:
- ${{ stdlib('c') }}
- ${{ compiler('c') }}
- ${{ compiler('cxx') }} # optional
- cmake
- ninja
host:
# put any dependencies here
run_exports:
- ${{ pin_subpackage('example-package', upper_bound='x.x.x') }}

tests:
- package_contents:
lib:
- example_package
Copy link
Member

Choose a reason for hiding this comment

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

Maybe helpful to add some inline comments with short explanations like those you can see in #2739.

Or, otherwise, a paragraph or two explaining some of the decisions made in this recipem like in Rust or Go.

Copy link
Member Author

Choose a reason for hiding this comment

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

i would prefer adding the paragraphs below as i always get annoyed by the need to delete half of the lines in https://github.com/conda-forge/staged-recipes/blob/main/recipes/example-v1/recipe.yaml

Comment on lines +23 to +29
- if: unix
then:
- cmake -B build -GNinja $CMAKE_ARGS .
else:
- cmake -B build -GNinja %CMAKE_ARGS% .
- cmake --build build
- cmake --install build
Copy link
Member

Choose a reason for hiding this comment

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

Let's use scripts for these and add ctest, CPU_COUNT etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

wdym with scripts? build.sh and build.bat?

Copy link
Member

Choose a reason for hiding this comment

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

yes

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.

3 participants