Skip to content
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

quote CPUINFO in cmake #983

Merged
merged 1 commit into from
Apr 15, 2023
Merged

quote CPUINFO in cmake #983

merged 1 commit into from
Apr 15, 2023

Conversation

josharian
Copy link
Contributor

Without these quotes, cmake fails in a confusing manner on systems whose cpuinfo output includes spaces.

This arose in the context of attempting to compile natively on an m1 mac.

$ /usr/sbin/sysctl -n machdep.cpu.features machdep.cpu.leaf7_features
sysctl: unknown oid 'machdep.cpu.leaf7_features'

Obviously, this didn't work out well; there is still much more to do. Still, the quotes are cheap and eliminate a confusing failure mode in favor of the real problem. For this reason, I added them to the linux as well as the darwin path.

Added dependencies: none

How to test

Run cmake. Observe that nothing has changed.

Checklist

  • [ X ] I have tested the code manually
  • [ N/A ] I have run regression tests
  • [ X ] I have read and followed CONTRIBUTING.md
  • [ N/A ] I have updated CHANGELOG.md

Without these quotes, cmake fails in a confusing manner
on systems whose cpuinfo output includes spaces.

This arose in the context of attempting to compile natively on an m1 mac.

$ /usr/sbin/sysctl -n machdep.cpu.features machdep.cpu.leaf7_features
sysctl: unknown oid 'machdep.cpu.leaf7_features'

Obviously, this didn't work out well; there is still much more to do.
Still, the quotes are cheap and eliminate a confusing failure mode.
For this reason, I added them to the linux as well as the darwin path.
Copy link
Member

@snukky snukky left a comment

Choose a reason for hiding this comment

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

Thanks for this!

@snukky snukky merged commit 3daf4ee into marian-nmt:master Apr 15, 2023
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