如何为cmake设置C编译器?

时间:2019-07-10 00:31:51

标签: cmake

在运行cmake之前,我

export CXX="gcc-9"
export C="gcc-9"

这适用于CXX,但不适用于C。cmake的输出:

-- The C compiler identification is AppleClang 10.0.1.10010046  
-- The CXX compiler identification is GNU 9.1.0

我希望C编译器也可以是GNU 9.1.0(gcc-9)。我该如何实现?

0 个答案:

没有答案