Skip to content

Commit

Permalink
cmake: actually print the cycle in the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker authored and eli-schwartz committed Sep 13, 2024
1 parent 1888697 commit 7813354
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mesonbuild/cmake/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,7 +1060,9 @@ def extract_tgt(tgt: T.Union[ConverterTarget, ConverterCustomTarget, CustomTarge

def detect_cycle(tgt: T.Union[ConverterTarget, ConverterCustomTarget]) -> None:
if tgt.name in processing:
raise CMakeException('Cycle in CMake inputs/dependencies detected')
processing.append(tgt.name)
stack = ' -> '.join(processing)
raise CMakeException(f'Cycle in CMake inputs/dependencies detected: {stack}')
processing.append(tgt.name)

def resolve_ctgt_ref(ref: CustomTargetReference) -> T.Union[IdNode, IndexNode]:
Expand Down

0 comments on commit 7813354

Please sign in to comment.