CMake 可执行文件最小示例

此 CMakeLists.txt 从 main.cpp 构建名为 main 的可执行文件:

CMakeLists.txt
add_executable(main main.cpp)

Check out similar posts by category: CMake