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)