小编王子铭*_*王子铭的帖子

CMake 无法在 Windows 上创建 MakeFile

当我尝试运行时cmake,它确实生成了一堆文件,但没有创建 MakeFile。

CMakeLists.txt

PROJECT(main)
CMAKE_MINIMUM_REQUIRED(VERSION 3.16) 
AUX_SOURCE_DIRECTORY(. DIR_SRCS)
ADD_EXECUTABLE(main ${DIR_SRCS})
Run Code Online (Sandbox Code Playgroud)

主文件

int main()
{
    return 0;
}
Run Code Online (Sandbox Code Playgroud)

cmake在cmd中运行后,它给了我这个

E:\practiceFolder\cake>cmake .
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18362.
-- The C compiler identification is MSVC 19.21.27702.2
-- The CXX compiler identification is MSVC 19.21.27702.2
-- Check for working C compiler: D:/VisualStudio2019/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe
-- Check for working C compiler: D:/VisualStudio2019/VC/Tools/MSVC/14.21.27702/bin/Hostx64/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting …
Run Code Online (Sandbox Code Playgroud)

c makefile cmake

5
推荐指数
1
解决办法
801
查看次数

标签 统计

c ×1

cmake ×1

makefile ×1