check_cxx_source_runs ([=[
void foobar() { }
int main()
{
HANDLE process = GetCurrentProcess();
if (!SymInitialize(process, NULL, TRUE))
return EXIT_FAILURE;
char buf[sizeof(SYMBOL_INFO) + MAX_SYM_NAME];
SYMBOL_INFO *symbol = reinterpret_cast<SYMBOL_INFO *>(buf);
symbol->SizeOfStruct = sizeof(SYMBOL_INFO);
symbol->MaxNameLen = MAX_SYM_NAME;
void* const pc = reinterpret_cast<void*>(&foobar);
BOOL ret = SymFromAddr(process, reinterpret_cast<DWORD64>(pc), 0, symbol);
return ret ? EXIT_SUCCESS : EXIT_FAILURE;
}
]=] HAVE_SYMBOLIZE)