Coder Social home page Coder Social logo

build-variables's Introduction

Overview

This repository is intended to centralize string data common to many viewer builds (such as required compiler switches), both internal to Linden and external, on TeamCity and on individual dev machines.

Bash Usage

Intended usage is to clone this repository as a sibling to the source directory being built, then use the bash "source" or "." commands to read ../build-variables/convenience into your build script. This gives you shell variables such as

LL_BUILD_RELEASE, LL_BUILD_RELWITHDEBINFO, LL_BUILD_DEBUG

which are aliases for the platform-specific variables (e.g.)

LL_BUILD_LINUX_RELEASE, LL_BUILD_LINUX_RELWITHDEBINFO, LL_BUILD_LINUX_DEBUG

et al.

If you pass a build-type argument (Release, RelWithDebInfo, Debug) when sourcing the convenience script, e.g.:

source ../build-variables/convenience Release

then you get the additional alias LL_BUILD, which (in the example above, assuming you're running on Linux) is the same as LL_BUILD_LINUX_RELEASE.

The functions script (also sourced by convenience) provides bash functions for removing or replacing individual switches from any one of those variables. See the comments in the script for function usage.

Other Languages

Variable Suite

The convenience script sources the variables script, which provides the underlying suite of variables. Variable names are of the form:

LL_BUILD_{platform}_{buildtype}

where:

component meaning
platform WINDOWS, DARWIN, LINUX.
buildtype RELEASE, RELWITHDEBINFO, DEBUG. BASE for switches common to all.

These variables are in turn composed of variables that separate out command-line macro definitions from other kinds of compiler switches:

LL_BUILD_{platform}_{buildtype}_{category}

where:

component meaning
category MACROS, SWITCHES.

These are typically aggregated into the corresponding LL_BUILD_{platform}_{buildtype} variables:

LL_BUILD_LINUX_RELEASE="$LL_BUILD_LINUX_RELEASE_SWITCHES $LL_BUILD_LINUX_RELEASE_MACROS"

CMake, in particular, distinguishes between macro definitions (add_definitions()) and other compiler switches (add_compile_options()), so it may be useful to populate those CMake commands from the underlying _MACROS and _SWITCHES variables.

Parsing the variables file

The variables file should be kept as simple as possible to parse, so it can be read from other languages than bash. Refer to the comments in that file itself for syntax rules.

build-variables's People

Contributors

nat-goodspeed avatar oz-linden avatar callumprentice avatar callumlinden avatar euclid-linden avatar coyotlinden avatar nicky-d avatar bennettgoble avatar vir-linden 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.