What is the TACO Dependency Provider?

TACO is the Tool Automation Collection developed by Vector Informatik GmbH. The Tool Automation Collection is a collection of CMake scripts, find modules, and toolchain files for an easy creation of consistent CMake projects.

The TACO dependency provider service is part of the TACO module TacoProvider.cmake using the CMake feature dependency provider available since CMake 3.24.

Motivation

To achieve common and consistent dependency management for various CMake-based projects, TACO focuses on simplifying the creation of reusable CMake projects. These projects should be easily integrable into consuming CMake projects either as a subproject or as a CMake install package with pre-built artifacts.

Consumers of a project might need to fully replace dependency management, such as changing the protocols or specifying different locations for loading associated artifacts. While the TACO dependency provider service supports various use cases, it does not entirely replace package managers like Conan for handling pre-built artifacts.

When to Use TACO

Use the TACO dependency provider for your project if there are CMake project dependencies that should be found and integrated.

How to reuse a CMake project with TACO

The following command allows you to specify which components of a CMake project you want to reuse in your application.

find_package(<PROJECT_NAME> COMPONENTS…)

 

Handling Local Project Dependencies

The local CMake project dependencies can be configured by creating a Dependencies.json file in the root directory of your CMake project, in this case the Hello World Project.

notice

Reference: For further information on the possible content of a Dependencies.json file regarding supported protocols and services and associated options, refer to the TACO guide in your delivery.

 

notice

Note: The CMake dependency provider mechanism will work only for the top-level CMake project and not recursively for one or more CMake subprojects.

Local Example

This example shows how to configure locally available dependencies in the Dependencies.json file which is expected by the TACO dependency provider service, located in the BSW package:

 

JSON

{
  "name": "<PROJECT_NAME>",
  "located": "./<relative-path>"
}

 

notice

<PROJECT_NAME> must be replaced by the correct CMake project or package name to be integrated. Replace also <relative-path> with a relative path to the root directory of the consuming CMake project, such as "located": "./ThirdParty". Absolute paths outside the CMake project root directory lead to performance problems when building the project, e.g. if build times are to be optimized with Ccache compiler caching.

Network Example

This example shows how to configure an expected CMake dependency that is stored at a network location and can be loaded from there during CMake project initialization:

 

JSON

{
  "name": "<PROJECT_NAME>",
  "located": "./<relative-path>",
  "url": "<uniform-resource-locator>"
}

 

notice

<uniform-resource-locator> must be replaced by an address where dependencies can be loaded from. Fetching from network usually requires authentication mechanisms, which may vary depending on the protocol and service used. It is also possible to load CMake install packages that have already been created (Platform SDK), but with the restriction that the CMake package to be loaded must be binary-compatible with your target architecture, target platform and toolchain to build for.