View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013220CMake(No Category)public2012-05-14 19:522012-10-01 13:23
ReporterBrian Helba 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0013220: In trace mode, evaluated 'elseif'/'else' commands are not printed
DescriptionIn trace mode ('--trace'), only the opening 'if' command of a conditional block is printed. If the opening 'if' command evaluates False, any subsequent 'elseif'/'else' statements will be evaluated by CMake ('else' is a trivial evaluation), but not printed.

Determining which 'elseif'/'else' commands were evaluated can still be done implicitly, by examining which set of consequent commands are evaluated. However, actually printing which 'elseif'/'else' commands are evaluated would make trace mode more usable and consistent (since 'if' evaluation is printed).
Steps To ReproduceFor "test.cmake":
  IF(0)
    COMMAND1()
  ELSEIF(0)
    COMMAND2()
  ELSEIF(1)
    COMMAND3()
  ELSE()
    COMMAND4()
  ENDIF()

Current output in trace mode ("cmake --trace -P test.cmake"):
  test.cmake(1): IF(0 )
  test.cmake(6): COMMAND3( )

Preferred output would be:
  test.cmake(1): IF(0 )
  test.cmake(3): ELSEIF(0 )
  test.cmake(5): ELSEIF(1 )
  test.cmake(6): COMMAND3( )
TagsNo tags attached.
Attached Filespatch file icon 0001-Print-any-evaluated-elseif-else-commands-in-trace-mo.patch [^] (4,090 bytes) 2012-05-15 14:54 [Show Content]

 Relationships

  Notes
(0029481)
Brad King (manager)
2012-05-16 09:20

Thanks. Applied with minor whitespace and line length adjustments:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b3b095a9 [^]
(0031130)
David Cole (manager)
2012-10-01 13:23

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2012-05-14 19:52 Brian Helba New Issue
2012-05-15 14:54 Brian Helba File Added: 0001-Print-any-evaluated-elseif-else-commands-in-trace-mo.patch
2012-05-16 09:20 Brad King Note Added: 0029481
2012-05-16 09:20 Brad King Assigned To => Brad King
2012-05-16 09:20 Brad King Status new => resolved
2012-05-16 09:20 Brad King Resolution open => fixed
2012-05-16 09:20 Brad King Fixed in Version => CMake 2.8.9
2012-05-16 09:20 Brad King Target Version => CMake 2.8.9
2012-10-01 13:23 David Cole Note Added: 0031130
2012-10-01 13:23 David Cole Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team