首页 > 解决方案 > CLion 未能检测到 C/C++ 编译器 ABI 信息

问题描述

我有一个用于构建项目的自定义工具链。通过自定义工具链,我的意思是 Clang C 编译器、C++ 编译器和链接器的衍生产品。

项目构建得很好,但我无法使用 CLion 的 Intellij 功能,因为由于无法识别自定义工具链,它无法构建标签数据库(或它在后台所做的任何事情) .

因此,点击Tools-> CMake->Reset Cache and Reload Project会吐出:

/Applications/CLion.app/Contents/bin/cmake/mac/bin/cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=~/<path-to-custom-toolchain>/Toolchain.cmake -G "CodeBlocks - Unix Makefiles" /Users/<project-directory>/src
-- Setting up Toolchain 1.0 at /Users/<tools>/build
-- Setting up Toolchain 1.0 at /Users/<tools>/build
-- The C compiler identification is Clang 7.0.0
-- The CXX compiler identification is Clang 7.0.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - failed
-- Configuring done

项目首选项的屏幕截图(这是一个链接,因为我还没有发布图像所需的代表):
项目首选项


所以我的问题是,我应该如何解决这个问题?还是这个问题超出了 CLion 的限制?还是我对问题的理解不完整?

标签: cmakeclion

解决方案


推荐阅读