Skip to content

Instantly share code, notes, and snippets.

@YukiSakamoto
Created February 19, 2020 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save YukiSakamoto/e0ccda9dbc37dedc639efa2bebf78316 to your computer and use it in GitHub Desktop.
Save YukiSakamoto/e0ccda9dbc37dedc639efa2bebf78316 to your computer and use it in GitHub Desktop.
Get CPU type of Mac
#include <mach-o/arch.h>
#include <iostream>
int main(void)
{
const NXArchInfo *pNXArchInfo = NXGetLocalArchInfo();
std::cout << pNXArchInfo->name << std::endl;
std::cout << pNXArchInfo->description << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment