Skip to content

WIP: ExternalProject FetchContent: Restore support for shell features

Craig Scott requested to merge craig.scott/cmake:ep-shell-features into master

4f3d1abb (ExternalProject: Refactor pre-configure steps to support no-target uses, 2021-02-05) changed the way custom commands were implemented such that they use execute_process() in a dedicated CMake script. Previously, they were implemented as a custom command via add_custom_command(). The former does not support features like shell redirection or special variables understood by the build tool (e.g. $(MAKE)). Restore the old method of using add_custom_command() for ExternalProject. For FetchContent, wrap the command given to execute_process() in a shell invocation so that shell features are once again available.

Fixes: #21892 (closed)
Backport: release

Edited by Craig Scott

Merge request reports