在根目录下进入cmd 命令行 执行如下命令
cmake -G"Visual Studio 16 2019" -S . -B build_x64
上面的命令表示 转换成 vs2019 目标工程文件放在 根目录下的 build_x64 目录
cmake -G"Visual Studio 15 2017 Win64" -S . -B build_x64 _DTEST_ENABLE=1
-DTEST_ENABLE=1 便是TEST_ENABLE开关打开,在CMakeLists中用option制定的选项
cmake --build build_x64 --config Release
cmake --install build_x64
更多用法 可以 cmake /help 自己去探索