Code Monkey home page Code Monkey logo

objcpp-example's Introduction

Objective-C++ Example

Description

==========================

Hello world.

About

==========================

Objective-C++ Example is an example project using Meson build system the simple way.

Features

==========================

  • Meson as the main tool for generating ninja build files.
  • Simple project structure just for you.
  • Distributed under the MIT license.
  • Works 99.95% out of the box.

Required tools

==========================

  • Meson version 0.50.0 or newer.
  • Python 3 version 3.5.x or newer.

Downloading

==========================

To install this project the simplest way is to grab it off github with this command the Github command looks something like this:

git clone https://github.com/squidfarts/objcpp-example.git

You can also download it as a zip if you prefer.

Build and install

==========================

Setting up Meson.

Meson is a build system that is designed to be as user-friendly as possible without sacrificing performance. The main tool for this is a custom language that the user uses to describe the structure of his build. The main design goals of this language has been simplicity, clarity and conciseness. Much inspiration was drawn from the Python programming language, which is considered very readable, even to people who have not programmed in Python before.

Another main idea has been to provide first class support for modern programming tools and best practices. These include features as varied as unit testing, code coverage reporting, precompiled headers and the like. All of these features should be immediately available to any project using Meson. The user should not need to hunt for third party macros or write shell scripts to get these features. They should just work out of the box.

This power should not come at the expense of limited usability. Many software builds require unorthodox steps. A common example is that you first need to build a custom tool and then use that tool to generate more source code to build. This functionality needs to be supported and be as easy to use as other parts of the system.

Meson has two main dependencies.

If you will only use the Visual Studio backend (--backend=vs) to generate Visual Studio solutions on Windows or the XCode backend (--backend=xcode) to generate XCode projects on macOS, you do not need Ninja.

Running Meson

Meson requires that you have a source directory and a build directory and that these two are different. In your source root must exist a file called 'meson.build'. To generate the build system run this command:

meson <source directory> <build directory>

Depending on how you obtained Meson the command might also be called meson.py instead of plain meson. In the rest of this document we are going to use the letter form.

Configuring the build directory

Let us assume that we have a source tree that has a Meson build system. This means that at the topmost directory has a file called meson.build. We run the following commands to get the build started.

meson setup <build dir name>

The main usability difference between Ninja and Make is that Ninja will automatically detect the number of CPUs in your computer and parallelize itself accordingly. You can override the amount of parallel processes used with the command line argument -j .

Building from the source

Meson uses the Ninja build system to actually build the code. To start the build, simply type the following command.

ninja -C <build dir name>

Running tests

Meson provides native support for running tests. The command to do that is simple.

meson test -C <build dir name> --num-processes

Installing

Installing the built software with Meson is just as simple as.

meson install -C <build dir name>

This should build the project and install the project.

Contact

==========================

Developer and maintainer

Happy planing. Happy coding...

objcpp-example's People

Contributors

squidfarts avatar

Watchers

 avatar  avatar

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.