diff options
author | Craig Scott <craig.scott@crascit.com> | 2022-05-15 09:02:27 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2022-05-17 04:33:29 (GMT) |
commit | 74a6ddc339ba36637949e40cad216d41adb552a7 (patch) | |
tree | c72a6b3cb79ba735c119273edc116b41f538d188 /Help/guide/tutorial/Step6 | |
parent | 943210856ae433708a7e12866e94f6dcaacc3248 (diff) | |
download | CMake-74a6ddc339ba36637949e40cad216d41adb552a7.zip CMake-74a6ddc339ba36637949e40cad216d41adb552a7.tar.gz CMake-74a6ddc339ba36637949e40cad216d41adb552a7.tar.bz2 |
cmFindPackageCommand: Handle Makefile variable definitions more robustly
During argument parsing in InitialPass(), Makefile variables were
being added for components. Most other such variables were set
in the call to SetModuleVariables(), which happens much later.
Both sets of variables were then restored to their previous values
as part of a call to AppendSuccessInformation(), but that is not an
obvious nor robust place to undo those variable changes.
InitialPass() also pushes a new item to the package root stack, but
the corresponding pop was in AppendSuccessInformation().
Again, this puts a symmetric operation in an asymmetric place.
Refactor the code slightly such that Makefile variables are set in
one clear location, then restored later in the same function.
Also move the package root stack pop into the same function as
the push. AppendSuccessInformation() now has one clear
responsibility and doesn't perform any unrelated cleanup on
behalf of InitialPass().
Diffstat (limited to 'Help/guide/tutorial/Step6')
0 files changed, 0 insertions, 0 deletions