-
Notifications
You must be signed in to change notification settings - Fork 265
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
Fix processor detection in CMakeLists.txt #909
Conversation
2501f04
to
d349eb9
Compare
CI failed in windows:
I don't have Windows environment to test. |
Another case is Universal macOS builds, setup with e.g. I don't think the current build layout can handle that, and matching one It'd be useful to make that work out of the box. For that, the CPU |
Hi, thanks for the PR. I think what you are doing here is correct; the Windows failure is due to it actually fixing the detection of processor and enabling MASM assembly in the build, which is coincidentally broken. I'll add a patch to this to work around that and fix the MASM in another patch set so this applies cleanly on its own. |
CMAKE_SYSTEM_NAME
is set to the OS name, e.g. Linux. It should checkCMAKE_SYSTEM_PROCESSOR
instead.The regex is wrong:
[i?86|x86]
will matching anything containing6
, so it will take the wrong branch for many ISAs, e.g. riscv64 and even ARM64 when it is uppercased. It eventually leads to wrong DES encryption due to wrongsizeof(DES_LONG)
.Handle cases when
CMAKE_SYSTEM_PROCESSOR
is upper-cased, e.g. in windows.