Skip to content
  • Stephen Kelly's avatar
    cmState: Move snapshot creation to the cmake instance. · 01e1cd5c
    Stephen Kelly authored
    Don't create a snapshot in Initialize(), but leave the creation
    responsibility to the cmake instance instead.  Previously, the
    cmState would Initialize() in its constructor, and the cmake instance
    would re-Initialize() during Configure().  The end result was the
    same and there would be one snapshot present.  However, cmLocalGenerator
    also created a snapshot on construction, and that one was used, leaving
    the first snapshot unused, and potential for off-by-one errors.
    
    Fix that by making the cmLocalGenerator use the existing snapshot
    if it is top-level.  Add a CurrentSnapshot to the cmake instance and
    populated it while configuring a directory.  This will eventually
    replace the 'current local generator' concept.  Fix the GetParent
    implementation to be able to return the first snapshot.
    01e1cd5c