Hello world in C++ using Windows, vcpkg, cmake, and ninja

c:\code\hello\hello.cpp

#include <iostream>
#include <boost/array.hpp>

int main() {
    boost::array<int, 2> a;
    a[0] = 2;
    std::cout << "Hello world!" << std::endl;
}

c:\code\CMakeLists.txt

cmake_minimum_required (VERSION 3.0)
project(hello)
find_package(Boost)
include_directories (${Boost_INCLUDE_DIRS})
add_executable(${PROJECT_NAME} hello.cpp)

Install vcpkg

On command prompt:

cd c:\code
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
bootstrap-vcpkg
vcpkg integrate install

Install packages

On command prompt:

cd c:\code\vcpkg
vcpkg install boost-array

Building Ninja files

On command prompt:

cd c:\code\hello
mkdir ninja
cd ninja
cmake .. -GNinja -DCMAKE_TOOLCHAIN_FILE="c:\code\vcpkg\scripts\buildsystems\vcpkg.cmake"

Building the application

On command prompt:

cd c:\code\hello\ninja
ninja

Running the application

On command prompt:

cd c:\code\hello\ninja
hello