Skip to content

samsellem/Buildyard

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buildyard

Introduction

Buildyard facilitates the build and development of multiple, dependent projects from installed packages, git or svn repositories. The following projects are currently available, with optional projects drawn as dotted bubbles, and optional dependencies linked using dotted arrows:

Depency Graph

Presentation

Presentation.pdf

Using

Visual Studio

Use cmake to build a Visual Studio Solution. Build this solution at least once to download and install all dependencies. Do not use 'Build - Build Solution', but build the project 'ALL_BUILD' or '00_Main - AllProjects' instead. The solution contains sub-targets without proper dependencies, which will cause build failures.

For development, open [build]/[Project]/[Project].sln and work there as usual. This solution will build the (pre-configured) project without considering any dependencies. Use the [build]/Buildyard.sln target to build a project considering all dependencies.

Others

Execute 'make' or 'make [Project]', which invokes cmake and builds debug versions of all or the specified project.

For development, cd into src/[Project] and work there as usual. The default make target will build the (pre-configured) project without considering any dependencies. 'make [Project]' will build the project considering all dependencies.

Custom CMake binary directories are supported and can be used through the top-level make using 'make BUILD=[directory]' or 'export BUILD=[directory]; make'.

Directory Layout

  • config/ : The builtin configuration files
  • config.[name] : a configuration module, e.g., config.eyescale
  • config.[name]/depends.txt : modules upon which the module depends, e.g., config.eyescale/depends.txt. Dependencies will be cloned by Buildyard automatically.
  • config.[name]/[Project].cmake : A project configuration file (see Configuration)
  • Build/ : The build directory where all generated files land.
  • Build/[Project] : The project build directory, including binaries
  • Release/... : Same as build, but for a 'make release' build
  • src/ : The directories into which all project sources are cloned
  • src/[Project] : The source directory for the project. You can work from here, since a Makefile is generated by Buildyard for you (see Using).

Configuration

Configurations are grouped in a per-organisation config.[org] folder, for example config.eyescale. Simply clone these repositories into the Buildyard directory.

The ExternalProject CMake module is the foundation for a simplified per-project configuration file. Each project has a config*/name.cmake configuration file, for example Equalizer.cmake. It contains the following variables:

  • NAME_VERSION: the required version of the project
  • NAME_DEPENDS: list of dependencies, OPTIONAL and REQUIRED keywords are recognized. Projects with missing required dependencies will not be configured.
  • NAME_DEPENDEE_COMPONENTS: list of COMPONENTS for find_package.
  • NAME_REPO_TYPE: optional, git, git-svn or svn. Default is git.
  • NAME_REPO_URL: git or svn repository URL.
  • NAME_REPO_TAG: The svn revision or git tag to use to build the project
  • NAME_ROOT_VAR: optional CMake variable name for the project root, as required by the project find script. Default is NAME_ROOT.
  • NAME_TAIL_REVISION: The oldest revision a git-svn repository should be cloned with.
  • NAME_CMAKE_ARGS Additional CMake arguments for the configure step. The character '!' can be used to separate list items.

Extending

The top-level CMakeLists reads all .cmake files from all config* directories, and use them as a project. This allows extending the base configuration with custom projects from other sources. A depends.txt file can be used to automatically pull in other configuration folders, e.g.: https://github.com/Eyescale/config/blob/master/depends.txt

Options

Local overrides

For customizing the shipped configurations one can override and extend those configurations with a config.local/name.cmake configuration. Additional options are available there to specify a user fork for instance. Note that this options are only valid for git repositories:

  • NAME_USER_URL: the URL of the new origin for the project
  • NAME_ORIGIN_NAME: the new remote name of the original origin (optional, default 'root')

Force build from source

Setting NAME_FORCE_BUILD to ON will disable finding installed versions of the project, causing the project to be always build from source.

Targets

Below are the targets in addition to the standard targets of ExternalProject.cmake:

NAME-buildonly

Builds only the the given project without considering dependencies, update and configure steps.

NAME-projects

Builds all non-optional dependees of the given project, useful for testing downstream projects after API changes.

NAME-deps

Builds all dependencies of the given project.

NAME-reset

Cleans all working changes in the project's source directory.

stats

Runs 'SCM status' on all projects.

update

Updates all Buildyard configurations when called from Buildyard source directory, and updates project when called from project source directory.

Tips and Tricks

Macports files

Buildyard automatically creates portfiles for MacPorts. Simply add Buildyard/Build/install/ports to your sources:

sudo vi /opt/local/etc/macports/sources.conf
[...]
file:///Users/eilemann/Software/Buildyard/Build/install/ports/
[...]
sudo port install Equalizer +universal

Known issues

  • Boost build not automatically triggered on VS2010 (#17)

About

Multi-project CMake build system

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 91.1%
  • Python 8.0%
  • Shell 0.9%