2.5.1. GUI: Visual Studio¶
Open CMake GUI:
Click Browse Source... and find directory with CMakeLists.txt and foo.cpp:
Now we need to choose directory where to put all temporary files. Let’s create
separate directory so we can keep our original directory clean.
Click Browse Build..:
Find directory with CMakeLists.txt and click Make New Folder to create
_builds directory:
Check the resulted layout:
Click on Configure to process CMakeLists.txt:
CMake will ask for the generator you want to use.
Pick Visual Studio you have installed and add Win64 to have x64 target:
After you click Finish CMake will run internal tests on build tool to
check that everything works correctly. You can see Configuring done
message when finished:
For now there was no native build tool files generated, on this step user
is able to do additional tuning of project. We don’t want such tuning now so
will run Generate:
Now if you take a look at _builds folder you can find generated
Visual Studio solution file:
Open foo.sln and run executable.