Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes the issue of building TPLs where one of the dependencies is provided by the user at a pre-installed location.
It works by checking if a target will be built or not, setting a variable
<tpl_name>_build_dep
to eitherempty
or the<tpl_name>
. The<tpl_name>_build_dep
variable is then referenced in the DEPENDS list of the ExternalProject_Add of the dependent target.Testing
I have built and tested this by providing my own pre-built and installed version of hdf5 and passing that to cmake. This built and passed all tests. However I was not able to build using the installed hdf5 in gapps/Spheral/tpl... .