Skip to content

WIP: Decouple cmState and cmStateSnapshot from cmOutputConverter

bmanga requested to merge bmanga/cmake:output-converter into master

This was done through a number of steps:

  • Move cmOutputConverter::ForceToRelativePath to cmSystem
  • Move cmOutputConverter::ContainedInDirectory to cmStateDirectory
  • Move cmOutputConverter::ConvertToRelativePath logic into cmStateDirectory. Deduplicate MaybeConvertToRelativePath and move its functionality to cmLocalGenerator
  • Modify cmOutputConverter to only store the relevant booleans instead of relying on a cmStateSnapshot

The list of booleans doesn't look very nice, but I think they model the two concepts of a shell path 'style' (Windows, Unix) and shell flavor (Unix, Watcom, MinGW, NMake, VS, MSYS). I have left out this change from this patch.

Another unclear point is whether it is possible to have a cmakelists.txt file that it is outside both the Source and the Binary directory. I assumed that can never be the case. See the FIXME comments.

Merge request reports