Cmake 指定编译器

系统中存在多个c/c++编译器时,需要cmake使用指定编译器编译

比如:gcc/g++,visual studio 2015,cmake默认gcc/g++,我需要生成VS项目

修改 CMakeLists.txt ,添加

set (CMAKE_GENERATOR "Visual Studio 14 2015 Win64")

猜你喜欢

转载自blog.csdn.net/xcls2010/article/details/79415194