linux cmake 报错 the c compiler identification is unknown

简介

RT

解决方案

cmake .. -DCMAKE_CXX_COMPILER=/usr/bin/c++ -DCMAKE_C_COMPILER=/usr/bin/gcc

另一个解决方案

也可以通过在CMakeLists.txt里面定义变量,类似

set(MOSEK_LIBRARIES /home/ling/mosek/9.2/tools/platform/linux64x86/bin)
set(MOSEK_INCLUDE_DIR /home/ling/mosek/9.2/tools/platform/linux64x86/h)
Hope is a good thing,maybe the best of things,and no good thing ever dies.----------- Andy Dufresne
原文地址:https://www.cnblogs.com/eat-too-much/p/14066798.html