Use your system’s CMake and gcc to configure, compile, and run.


If your system already has compatible versions of CMake and gcc installed, the project can be configured and built easily.


  • CMake 3.5+
  • gcc


All commands should be run from the out-of-tree build directory:

$ cd build_hello_world

Compile and Run

Configure the build system:

$ cmake ../hello_world

This generates the build system in your build directory from the CMakeLists.txt file in the specified source directory, hello_world.


$ make

Run the resulting executable using:

$ ./bin/hello_world
Hello, World!