install c++ compiler build tools windows MSVC
Abrir página "Use the Microsoft C++ toolset from the command line" https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=vs-2019
If you only want the command-line toolset, download the "Build Tools for Visual Studio" Fazer download do aquivo "vs_BuildTools.exe"
Excutar vs_BuildTools.exe
workloads > Desktop && Mobile > marcar "C++ build tools" e instalar
Criar projeto: buidl/ CMakeLists.txt
cmake_minimum_required(VERSION 3.17.0-rc1)
project(projeto C)
set (CMAKE_C_STANDARD 17)
add_executable(ex1 ex1.c)
add_executable(ex2 ex2.c)
add_executable(ex3 ex3.c)
ex1.c
Executar projeto
build> cmake -S .. -B . && cmake --build . --config
build> .\Debug\teste1.exe
build> cmake -G "Visual Studio 16 2019" -A x64 -S .. -B .
build> cmake --build . --config Debug
Menu Iniciar > Developer Command Prompt for VS 2019
cd <pasta>
cl ex1.c
ex1.exe