Copyright 2017, Skand Hurkat. All rights reserved.
mkdir build
cd build
cmake ..
make
### This will create an executable "hello-world" in the build directory.
./bin/hello-world
-
Use the CMake GUI.
-
Set the source directory to this directory.
-
Create a new "build" directory inside this one, set it as the build directory.
-
Click on "Configure".
-
Select the appropriate version of MSVC, e.g. "Visual Studio 14 2015 Win64".
-
Click "Finish".
-
-
Click on "Generate".
-
Click on "Open Project".
-
-
This will open a Visual Studio project with three targets -- ALL_BUILD, hello-world, ZERO_CHECK.
-
Click through Build -> Build solution.
-
This will create a folder (
bin/*
) for the current build configuration (Debug, MinSizeRel, Release, RelWithDebInfo) with ahello-world.exe
file. -
Open a command prompt or PowerShell window in this folder, type in
.\hello-world.exe
to run this executable.
-