使用 CMake 时,我注意到输出消息:
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
我只是好奇 CMake 如何检查编译器是否工作以及 ABI 信息。
最佳答案
你可以很容易地看到自己。代码位于 CMake 模块 CMakeDetermineCCompiler.cmake
, CMakeDetermineCompilerABI.cmake
等等
您可以在 your_cmake_install/share/cmake-2.8/Modules
中找到这些模块.
关于gcc - CMake 如何检查工作编译器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15698881/