Skip to content
This repository was archived by the owner on Apr 6, 2026. It is now read-only.

build2cmake: cxx-flags option for C++ compile flags for kernels#171

Merged
danieldk merged 2 commits into
mainfrom
kernel-cxx-flags
Jun 25, 2025
Merged

build2cmake: cxx-flags option for C++ compile flags for kernels#171
danieldk merged 2 commits into
mainfrom
kernel-cxx-flags

Conversation

@danieldk

Copy link
Copy Markdown
Member

No description provided.

@MekkCyber MekkCyber left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great !

Comment on lines +116 to +123
pub fn cxx_flags(&self) -> Option<&[String]> {
match self {
Kernel::Cuda { cxx_flags, .. } => cxx_flags.as_deref(),
Kernel::Metal { cxx_flags, .. } => cxx_flags.as_deref(),
Kernel::Rocm { cxx_flags, .. } => cxx_flags.as_deref(),
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

noob question : why not doing one match like this :

match self {
        Kernel::Cuda { cxx_flags, .. }
        | Kernel::Metal { cxx_flags, .. }
        | Kernel::Rocm { cxx_flags, .. } => cxx_flags.as_deref(),
    }

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Nicer indeed! Updated the PR.

@drbh drbh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm!

@danieldk danieldk merged commit 7e2d730 into main Jun 25, 2025
8 checks passed
@danieldk danieldk deleted the kernel-cxx-flags branch July 30, 2025 10:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants