2017-05-28 317 views
3

新的Visual Studio 2017安装程序可以选择安装旧的VS 140编译工具链以及新的VS 141工具集。这是在2017年安装CMake在2017年安装中找不到Visual Studio 140工具集

enter image description here

在安装程序成功安装V140工具集的选项,我甚至可以切换在我的Visual Studio项目/解决方案V140和V141之间的工具集,并成功打造,但我不能建使用CMake的v140工具集项目。当我运行时

cmake -G"Visual Studio 14 2015" ../Source 

cmake无法找到编译器和工具集。

-- The C compiler identification is unknown 
-- The CXX compiler identification is unknown 
CMake Error at CMakeLists.txt:2 (project): 
    No CMAKE_C_COMPILER could be found. 



CMake Error at CMakeLists.txt:2 (project): 
    No CMAKE_CXX_COMPILER could be found. 



-- Configuring incomplete, errors occurred! 

然而,正如所料,我可以成功地建立与Visual Studio 15 2017选项。没有任何方法可以在不安装VS2015的情况下将旧工具集与cmake一起使用?

回答

3

调用cmake时,可以使用-T标志指定工具集。请参阅文档herehere

+0

哦,是的,谢谢。就是这样。 – Ali

相关问题