Skip to content
forked from ecmwf/ecbuild

A CMake-based build system, consisting of a collection of CMake macros and functions that ease the managing of software build systems

License

Notifications You must be signed in to change notification settings

marcosbento/ecbuild

This branch is 21 commits behind ecmwf/ecbuild:develop.

Folders and files

NameName
Last commit message
Last commit date
Nov 12, 2024
Jan 27, 2023
May 26, 2021
Jan 23, 2025
Jun 5, 2019
Nov 15, 2021
Jun 3, 2019
May 7, 2021
Jan 26, 2021
Jan 23, 2025
Jan 19, 2018
Aug 17, 2022
Nov 16, 2015
Jan 22, 2021
Oct 15, 2013
Apr 3, 2020
Jan 19, 2018
Mar 21, 2019
Apr 3, 2020
May 8, 2019
May 6, 2021
May 8, 2015
Aug 25, 2020
Oct 13, 2020
Apr 11, 2016
Nov 20, 2015

Repository files navigation

ecbuild - ECMWF build system

ecBuild is built on top of CMake and consists of a set of macros as well as a wrapper around CMake. Calling:

ecbuild $SRC_DIR

is equivalent to:

cmake -DCMAKE_MODULE_PATH=$ECBUILD_DIR/cmake $SRC_DIR

Prior knowledge of CMake is assumed. For a tutorial, see e.g. https://cmake.org/cmake/help/latest/guide/tutorial/index.html

Quick start

ecBuild does not need to be compiled, and can be used directly from the source repository. If you want to install it, please refer to the INSTALL.rst file.

  1. Retrieve the source code:

    git clone https://github.com/ecmwf/ecbuild

  2. Add ecbuild to your PATH:

    export PATH=$PWD/ecbuild/bin:$PATH

Examples

The examples/ directory contains some sample projects that show how ecBuild can be used in various situations. For a quick introduction on how to write an ecBuild project, have a look at examples/simple/CMakeLists.txt.

Building a project

Just like CMake, ecBuild uses out-of-source builds. We will assume that your project sources are in $SRC_DIR (e.g. examples/simple), and that your build directory is $BUILD_DIR (e.g. $SRC_DIR/build):

mkdir -p $BUILD_DIR
cd $BUILD_DIR
ecbuild $SRC_DIR    # see `ecbuild --help`, you may pass CMake options as well
make                # add your favourite options, e.g. -j

About

A CMake-based build system, consisting of a collection of CMake macros and functions that ease the managing of software build systems

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CMake 90.3%
  • Shell 5.9%
  • Perl 1.6%
  • Fortran 1.3%
  • Python 0.5%
  • C++ 0.2%
  • C 0.2%