Welcome to Artichoke’s documentation!

status status

Introduction

You will find here a CMake module allowing to easily create a build system on top of ExternalProject module.

Features

  • Intuitive and easy way to “pass” CMake variables to external project. By default, variables are associated with CMAKE_CACHE_ARGS.
  • Support association of CMake variable with labels.
  • Automatically associate variables with CMAKE_ARGS if a multi-configuration CMake generator is used and ${CMAKE_CFG_INTDIR} is found in the value.
  • Automatically set external options LIST_SEPARATOR, CMAKE_GENERATOR, CMAKE_GENERATOR_PLATFORM and CMAKE_GENERATOR_TOOLSET.
  • Display a well-formatted and user friendly summary of the included external projects. For example, see here
  • Support Ninja generator:
    • If supported, USES_TERMINAL_* options are always set to dependent projects.
    • The following variables are automatically propagated to all projects:
      • CMAKE_EXPORT_COMPILE_COMMANDS
      • CMAKE_JOB_POOL_COMPILE
      • CMAKE_JOB_POOL_LINK
      • CMAKE_JOB_POOLS
  • Intuitive handling of USE_SYSTEM options.
  • Recipe to write external project file that can be:
    • downloaded/configured/built/installed
    • and/or found on system using find_package(<projectname> ...) calls
    • and/or explicitly specified using -D<projectname>_DIR:PATH=... variables.

Examples

Note

To be documented

Usage

Note

To be documented

Integrating CMake Module in your project

Two possible approaches:

  • Use git submodule to reference this repository.
  • Copy ExternalProjectDependency.cmake into your source tree making sure you reference the SHA in the associated commit message.

Test

sudo apt-get install cmake
git clone git://github.com/commontk/Artichoke
mkdir ArtichokeTest-build
cd ArtichokeTest-build
cmake ../Artichoke/Tests
ctest

Indices and tables