Giter Site home page Giter Site logo

cmake-hello-world's Introduction

This is an extremely simple example C++ application which uses CMake. It will build and install an application called CMakeHelloWorld which simply outputs "Hello, world!" to stdout.

Installation

As this is an example of how to use CMake you'll need to download it (http://www.cmake.org/cmake/resources/software.html) or install it via:

sudo apt-get install cmake

Once CMake has been install navigate to the root of the project and issue the following commands:

mkdir build
cd build
cmake .. && make
make install

You may need to usesudo make install command as it will install to /usr/local/bin . This might be a good opportunity to investigate stow (http://www.gnu.org/software/stow/manual/stow.html) as a means of managing the installation of applications in this manner, however I haven't gotten far enough into my CMake knowledge to take that step.

Usage

Once the executable has been created simply call CMakeHelloWorld, either from the build directory or anywhere (if you installed to /usr/local/bin, etc).

Uninstallation Removing the application is straight-forward. Simply delete the binary 'CMakeHelloWorld' from /usr/local/bin.

Caution I am a complete C++ noob. I've created this project as part of an effort to kickstart my C++ recovery as I have recently been placed on a team which is developing an embedded application. There may be any number of things wrong with this example. If you see something you know to be implemented incorrectly please contact me via github and I will do my best to correct it. Better, fork the project, fix it and issue a pull request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.