Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set FETCHCONTENT_SOURCE_DIR so that repos are only checked out once
The cmake scripts to fetch content such as llvm-project and picolibc can be called by both the top-level project as well as the sub-projects. To prevent the content being checked out and patched repeatedly, the FETCHCONTENT_SOURCE_DIR_<PROJECT> variables should be defined as these will override the declared source on any subsequent calls. These variables are already passed down from top-level to sub-project, however the variables themselves are never defined unless configured by a user. This patch addresses this by setting the variables inside the fetch scripts as soon as the fetch content is declared.
- Loading branch information