首页 > 解决方案 > 调试外部 CMake 项目(hunter_add_package)?

问题描述

我克隆了这个仓库“https://github.com/ethereum-mining/ethminer.git”。我使用 CMake 构建和调试了它,但是当我到达 CpuMiner.cpp (第 281 行)中的以下代码时,我无法调试它,因为在同一个项目中没有关于 ethash::search 函数的源代码。

    auto r = ethash::search(context, header, boundary, nonce, blocksize);
    if (r.solution_found)

该项目使用这个cmake指令:hunter_add_package(ethash) find_package(ethash CONFIG REQUIRED)

我不确定 Hunter 是如何工作的,找到 ethash repo 但可能 repo URL 是:“https://github.com/chfast/ethash.git”

如何在 ethminer 中调试 ethash 项目?我正在使用 Linux。

标签: c++cmakeethereum

解决方案


推荐阅读