Skip to content
Snippets Groups Projects

cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache

Merged Ben Boeckel requested to merge ben.boeckel/cmake:mark_as_advanced-without-cache into master

TODO:

  • policy docs
  • policy tests
  • mark_as_advanced docs
  • mark_as_advanced tests

Fixes: #18331 (closed)


Cc: @brad.king @robertmaynard @craig.scott

Edited by Ben Boeckel

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
63 << "\" is not in the cache. This results in an empty cache entry "
64 "which is no longer created with policy CMP0100";
65 mf.IssueMessage(MessageType::AUTHOR_WARNING, e.str());
38 66 }
67
68 // If it's not in the cache and we're using the new behavior, nothing to
69 // see here.
70 if (ignoreVariable) {
71 continue;
72 }
73
74 // Check if we want the old behavior of making a dummy cache entry.
75 if (oldBehavior) {
76 if (!state->GetCacheEntryValue(variable)) {
77 status.GetMakefile().GetCMakeInstance()->AddCacheEntry(
78 variable, nullptr, nullptr, cmStateEnums::UNINITIALIZED);
  • Ben Boeckel added 1 commit

    added 1 commit

    • 598a65b8 - WIP: cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache

    Compare with previous version

  • Errors:

    • commit 598a65b8 cannot be merged; it is marked as a work-in-progress (WIP).
    • commit 598a65b8 is not allowed because the following files are not formatted according to the 'clang-format-6.0' check: Source/cmMarkAsAdvancedCommand.cxx. Post a comment ending in the line Do: reformat to rewrite the MR source branch automatically.

    Warnings:

    • the merge request is marked as a work-in-progress.

    The warnings do not need to be fixed, but it is recommended to do so.

    Please rewrite commits to fix the errors listed above (adding fixup commits will not resolve the errors) and force-push the branch again to update the merge request.

  • Author Developer

    Do: reformat

  • This topic has been reformatted and pushed; please fetch from the source repository and reset your local branch to continue with further development on the reformatted commits.

  • Kitware Robot added 1 commit

    added 1 commit

    • 3e2f0baa - WIP: cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache

    Compare with previous version

  • Errors:

    • commit 3e2f0baa cannot be merged; it is marked as a work-in-progress (WIP).

    Warnings:

    • the merge request is marked as a work-in-progress.

    The warnings do not need to be fixed, but it is recommended to do so.

    Please rewrite commits to fix the errors listed above (adding fixup commits will not resolve the errors) and force-push the branch again to update the merge request.

  • Ben Boeckel added 1 commit

    added 1 commit

    • 1fde1df5 - WIP: cmMarkAsAdvancedCommand: ignore variables which don't exist in the cache

    Compare with previous version

  • Errors:

    • commit 1fde1df5 cannot be merged; it is marked as a work-in-progress (WIP).

    Warnings:

    • the merge request is marked as a work-in-progress.

    The warnings do not need to be fixed, but it is recommended to do so.

    Please rewrite commits to fix the errors listed above (adding fixup commits will not resolve the errors) and force-push the branch again to update the merge request.

  • We will need to update the mark_as_advanced.rst to clearly state that even if FORCE is specified that a cache variable will not be constructed.

  • Author Developer

    @sebholt FYI, we may have a policy number collision depending on whether this overlaps with your hh policy change.

  • mentioned in merge request cmb/cmb-superbuild!577 (merged)

  • Author Developer

    Testing to see which existing tests have this issue:

    Do: test

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading