Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
CMake
CMake
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,246
    • Issues 3,246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 11
    • Merge Requests 11
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Merge Requests
  • !4042

Merged
Opened Nov 12, 2019 by Charlie Barto@barcharcrazContributor

load_cache: allow one form in script mode

  • Overview 17
  • Commits 1
  • Pipelines 8
  • Changes 11
  • allows the new form of load_cache in script mode. Both technically could work (there's no cache to save, so the second form would just set "cache" variables, but usage of the second form in script mode is probably a bug.

  • also makes load_cache immediately terminate if it's passed no arguments, this isn't a bug fix or anything, but it could become one if the logic of load_cache's old mode changes.

I'm looking for feedback on the implementation before writing tests. In particular I want to know if cmLoadCacheCommand() is the correct place to be checking for script mode, and also if status.GetMakefile().GetCMakeInstance()->GetWorkingMode() == cmake::SCRIPT_MODE is the correct way to do so. I'd also like to know if there's any unforeseen interactions with findPackage mode I need to be aware of. This is my first contribution to cmake's c++ code (which I found pretty nice work work with) so I don't know how everything works.

Edited Nov 18, 2019 by Brad King
Assignee
Assign to
Reviewer
Request review from
3.17.0
Milestone
3.17.0 (Past due)
Assign milestone
Time tracking
Reference: cmake/cmake!4042
Source branch: load_cache_in_script