We will explore in detail the flexibility of the ExternalProject_Add command in the following recipes. Sometimes, however, the external project we want to use might require additional, non-standard steps to be performed. For this reason, the ExternalProject.cmake module defines the following additional commands:
- ExternalProject_Add_Step. Once an external project has been added, this command allows to latch additional commands on it as custom steps. See also: https://cmake.org/cmake/help/v3.5/module/ExternalProject.html#command:externalproject_add_step
- ExternalProject_Add_StepTargets. Lets you define steps, for example the build and test steps, in any external project as separate targets. This means that one can trigger these steps separately from the full external project and allows fine-grained control over complex dependencies within your project. See also: https://cmake.org/cmake/help/v3.5/module/ExternalProject.html#command:externalproject_add_steptargets
- ExternalProject_Add_StepDependencies. Sometimes steps for an external project might depend on targets outside it and this command is designed to take care of these cases. See also: https://cmake.org/cmake/help/v3.5/module/ExternalProject.html#command:externalproject_add_stepdependencies