1 创建最简单的cmake工程
#include <iostream>
using namespace std;
int main(int argc, char const *argv[])
{
cout << "hello world of cmake " << endl;
return 0;
}
cmake_minimum_required(VERSION 3.5)
project(hello_cmake)
add_executable(hello_cmake main.cpp)
2 执行命令
mkdir build
cmake .. -G Ninja