Skip to content

ExternalProject: Add INSTALL_BYPRODUCTS option

Add an INSTALL_BYPRODUCTS option to ExternalProject_Add that can be used to declare that files are BYPRODUCTS of the ExternalProject install step.

This is often required by the Ninja generator to explicitly declare dependencies. Previously, many users used BUILD_BYPRODUCTS, even if their files were created by the install step, not the build step.

This PR essentially just copies the code for BUILD_BYPRODUCTS.

I've also clarified that the BUILD_BYPRODUCTS and BYPRODUCTS options in ExternalProject may also be required when using the Ninja generator (as that's one of the primary reasons why you'd want to use those options), and I mentioned that add_custom_command has additional documentation on what BYPRODUCTS does.

Fixes: #24120 (closed)
Fixes: #23056 (closed)
Topic-rename: ExternalProject-INSTALL_BYPRODUCTS

Edited by Brad King

Merge request reports