-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set new package deps graph vars combining external and internal packages (#63) #530
Set new package deps graph vars combining external and internal packages (#63) #530
Conversation
…63) These names are more consistent with the other var names.
I noticed this while working on #63.
…fo.cmake (#63) That is where it should be. This function was only being called in TribitsPrintDependencyInfo.cmake. It was never being called in TribitsAdjustPackageEnables.cmake.
* tribits_set_dep_packages(): Renamed local vars and removed debugging code * tribits_append_forward_dep_packages(): Renamed local vars * tribits_parse_subpackages_append_packages_add_options(): Renamed local vars and removed deubbing code * tribits_process_package_dependencies_lists(): Rename local vars * Added period after comment link
This also exposed a defect with the file tribits/examples/MockTrilinos/TPLsList.cmake in that it did not list the TPL 'Zlib' but Zlib is listed as a TPL dependency in the file MockTrilinos/packages/zoltan/cmake/Dependencies.cmake. The updated code asserted the missing definition of Zlib as a TPL and errored out. To leave this new behavior technically breaks backwards compatibility. To keep backwards compatibility, I introduced the variable: <Project>_ASSERT_DEFINED_DEPENDENCIES and leaving it off by default to maintain backwards compatibility. NOTE: If a real TriBITS project had a case like this where a listed TPL dependency was not listed in the TPLsList.cmake file, then it would error out when trying to access the find module thorugh ${depPkg}_FINDMOD so this is not so harmful but it would be good to get the error message sooner. NOTE: As part of this, a lot of tests had to be touched because the TriBITS processing of the dependencies files no longer results in listing Zlib as a dependency of Zoltan with MockTrilinos. But this seems proper and correct and the behavior otherwise does not change.
…efined TPL Zlib (#63)
…default and doc (#63) This is still a BOOL var.
I used this for <Project>_ASSERT_DEFINED_DEPENDENCIES and I will use it for a few others as well.
…_ASSERT_MISSING_PACKAGES (#63) This is breaking backward compatibility! I just decided that it was too complex supporting <Project>_ASSERT_DEFINED_DEPENDENCIES and deprecating <Project>_ASSERT_MISSING_PACKAGES. And this is the time to remove backward compatibility. If a user tries to set <Project>_ASSERT_MISSING_PACKAGES to any non-empty value, then it will error out with a FATAL_ERROR with a good error message telling them to set <Project>_ASSERT_DEFINED_DEPENDENCIES. Therefore, users will just need to change <Project>_ASSERT_MISSING_PACKAGES=ON to <Project>_ASSERT_DEFINED_DEPENDENCIES=FATAL_ERROR or <Project>_ASSERT_MISSING_PACKAGES=OFF to <Project>_ASSERT_DEFINED_DEPENDENCIES=OFF and they will get the same behavior (except undefined external packages/TPLs will now result in a fatal error by default). To make this work, I had to only conditionally list Zlib as a TPL of Zoltan in MockTrilinos.
* Don't mention a global list since that is not helpful (I don't think) (and take the list argument away from the function) * Mention setting <Project>_ASSERT_DEFINED_DEPENDENCIES=IGNORE
…_cache_var() (#63) A few other things done here: * Don't assert correct values of ${PROJECT_NAME}_ASSERT_CORRECT_TRIBITS_USAGE in tribits_report_invalid_tribits_usage() since that is now done when defining the cache var. (And this resulted in removing the unit test for tribits_report_invalid_tribits_usage() that set ${PROJECT_NAME}_ASSERT_CORRECT_TRIBITS_USAGE=INVALID_ARGUMENT since that error will no longer be caught in that function.) * Updated documentation a little.
…ges (#63) Set the following new deps vars: * <Package>_LIB_DEFINED_DEPENDENCIES * <Package>_TEST_DEFINED_DEPENDENCIES * <Package>_[LIB|TEST]_DEP_REQUIRED_<depPkg> * <Package>_FORWARD_LIB_DEFINED_DEPENDENCIES * <Package>_FORWARD_TEST_DEFINED_DEPENDENCIES Everything will be refactored next to use these and remove usage of the old deps vars that differentiate between external packages/TPLs and internal packages. As part of this: * Changed tribits_set_dep_packages() from a function to a macro so simplify varaible management. This also resulted in changing several global_set() and dual_scope_set() statements to set() statements. * Changed tribits_append_forward_dep_packages() from a function to a macro and changed its argument list to support the new forward deps vars. This also involved changing from dual_scope_set() to set(). * Updated tests for MockTrilinos and TribitsExampleProject do set <Project>_DUMP_FORWARD_PACKAGE_DEPENDENCIES=ON and check for the new backward and forward deps vars listed above.
…-data-structures-2 Resolved conflict in: * tribits/CHANGELOG.md by combining the two sets of items from different PRs.
Hello @KyleFromKitware, can you please do a full review of this PR and select "Approve" if you approve (or suggest changes)? Otherwise, I will be working on the next PR based in this PR's branch so there is no huge rush to get this merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good for the most part, I suggested a few small changes.
tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake
Outdated
Show resolved
Hide resolved
tribits/core/package_arch/TribitsReadDepsFilesCreateDepsGraph.cmake
Outdated
Show resolved
Hide resolved
…530) * Change `if (<var> ${<listName>})` to `if (<var> IN LISTS <listName>)` where possible (i.e. where `<listName>` is not a macro argument). (This was suggested by @KyleFromKitware in review of PR #530.) * Adjust whitespace to be `if (<var> IN LISTS <listName>)`. (I am getting to where I want two spaces around `IN LISTS` but one space between `IN` and `LISTS`. I am just trying to come up with formatting conventions that improve readability without causing too much right drift.) * Added whitespace to other foreach() loops.
This is to make consistent with other cache vars using :BOOL as well. (But this does not change any observable behavior.) Suggested by @KyleFromKitware in review of PR #530.
@KyleFromKitware, can you please have a look at the remaining unresolved conversations above here and here and the approve the PR if you are satisfied? |
@KyleFromKitware, thanks for the detailed review and the feedback! I need two write up a CMake programming conventions guide to cover all of these issues and decide the best way to handle corner cases. |
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
…s#11152) Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Updated TriBITS 'master' now catches undefined TPLs listed as dependencies of a TriBITS package. (Amazingly, classic TriBITS simply silently ignored these undefined TPLs. See tribits/CHANGELOG.md entry in TriBITSPub/TriBITS#530.) This works with older TriBITS and will be needed when TriBITS 'master' is snapshotted into Trilinos 'develop'.
Description
This PR sets up the new package dependency vars described in the section Variables defining the package dependencies graph (except the list names
<Package>_FORWRD_[LIB|TEST]_DEP_PACKAGES
was changed to<Package>_FORWRD_[LIB|TEST]_DEFINED_DEPENDENCIES
for consistency with the new vars and to contrast with the old vars). This is another increment working to complete #63.See the individual commits for more details.
Instructions for Reviewers
<Project>_ASSERT_DEFINED_DEPENDENCIES
and<Project>_ASSERT_MISSING_PACKAGES
part way through the set of commits. (Therefore, be sure to compare with the final version of the file before putting any time into commenting an individual git commit patch.)