The packages.cmake fileΒΆ

The packages.cmake file defines which sub-directories are added to CI-project. It is read when calling the cpfAddPackages() function. The file must define the CMake variable CPF_PACKAGES. The file must be located parallel to the root CMakeLists.txt file.

The content may look something like this.

# File packages.cmake

set(CPF_PACKAGES
      EXTERNAL ExternalLib1
      EXTERNAL bli/blub/ExternalLib2
      OWNED Cpp/MyPackageA
      OWNED Cpp/MyPackageB
      OWNED documentation
)

The list should contain pairs in the shape of [EXTERNAL|OWNED] <package-dir>. Note that the name of the lowest directory must be the same as the package name. The order of the packages is important. The lower-level packages must be listed first to make sure they exist when they are linked to the higher-level packages that come later in the list. The EXTERNAL and OWNED keywords determine if the package belongs to this CI-project or another one. More about package ownership can be found in the Package Ownership section.