marian-nmt / marian-dev

Fast Neural Machine Translation in C++ - development repository
https://marian-nmt.github.io
Other
256 stars 126 forks source link

quote CPUINFO in cmake #983

Closed josharian closed 1 year ago

josharian commented 1 year ago

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