Skip to content

feat: add magic sccache integration for cmake #111

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Mar 27, 2025

No description provided.

@Copilot Copilot AI review requested due to automatic review settings March 27, 2025 12:59
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements magic integration for sccache with CMake by dynamically detecting its presence via environment variables and adjusting the build requirements accordingly.

  • Introduces sccache detection and injects it as a dependency in the CMake configuration
  • Propagates the sccache flag in the BuildScriptContext

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
crates/pixi-build-cmake/src/cmake.rs Adds sccache dependency when an env var with SCCACHE prefix is found
crates/pixi-build-cmake/src/build_script.rs Adds a new flag "has_sccache" to the build script context
Files not reviewed (1)
  • crates/pixi-build-cmake/src/build_script.j2: Language not supported
Comments suppressed due to low confidence (1)

crates/pixi-build-cmake/src/cmake.rs:116

  • Using starts_with to detect sccache may inadvertently capture environment variables that merely begin with 'SCCACHE' instead of exactly matching. Consider checking for equality with a specific variable (e.g., key == "SCCACHE") to avoid false positives.
let has_sccache = std::env::vars().any(|(key, _)| key.starts_with("SCCACHE"));

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