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

CPUINFO_SUPPORTED_PLATFORM not set on OSX as CMAKE_SYSTEM_PROCESSOR is not set #203

Open
Timen opened this issue Nov 21, 2023 · 1 comment
Labels

Comments

@Timen
Copy link

Timen commented Nov 21, 2023

CMAKE_SYSTEM_PROCESSOR is not set by cmake on apple platforms which causes this warning:

   MESSAGE(WARNING
      "Target processor architecture is not specified. "
      "cpuinfo will compile, but cpuinfo_initialize() will always fail.")

at this line:

MESSAGE(WARNING

There is actually a check if we are building for iOS that causes this warning to not be emitted and CPUINFO_SUPPORTED_PLATFORM be set to true, however this is not the case on OSX, is this on purpose?

@prashanthswami
Copy link
Collaborator

Just throwing in my two cents, I'm not entirely sure of the history of the line you've referenced. It looks like they were trying to fix the iOS build but the context of what was broken is lost.

Looking at CMake documentation, CMAKE_SYSTEM_PROCESSOR should be defined if you're not cross-compiling. I'm assuming that means you are and thus need a "a CMAKE_TOOLCHAIN_FILE should set the CMAKE_SYSTEM_PROCESSOR variable to match target architecture". Arguably, it may be the case that iOS needs this as well.

Perhaps you can provide some details of how you're configuring your build here for the maintainers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants