A simple example of the classic “Hello World!” C++ example built using cmake
.
cmake
environment
$ cmake -S ./src -B ./build
$ cmake --build ./build
$ cmake --build ./build --target clean
Note: Simple helper shell-scripts have been included for generating the cmake files, running the build and cleaning the environment.
cmkgenerate.sh
- generates the cmake/make filescmkbuild.sh
- builds the projectcmkclean.sh
- cleans the buildEnsure these are recognised as executable files and if not, run the following commannd:
$ chmod +x ./cmk*.sh
Note: The cmkclean.sh
shell-script accepts a command-line arg to completely reset the environment.
$ ./cmkclean --very-clean