MantisBT - CMake
View Issue Details
0014620CMakeCMakepublic2013-12-03 03:582016-06-10 14:31
Moshe Rubin 
Kitware Robot 
normalminoralways
closedmoved 
WindowsWindows 86.2 (build 9200)
CMake 2.8.12 
 
0014620: An extra space is added to traced statements in --trace mode
When running CMake with the "--trace" command line option, the traced statements are echoed in the trace output file.

<snippet>
.../CMakeVS11FindMake.cmake(51): mark_as_advanced(CMAKE_MAKE_PROGRAM )
.../CMakeVS11FindMake.cmake(52): set(MSVC11 1 )
.../CMakeVS11FindMake.cmake(53): set(MSVC_VERSION 1700 )
.../CMakeDetermineSystem.cmake(45): if(CMAKE_HOST_UNIX )
.../CMakeDetermineSystem.cmake(73): else()
.../CMakeDetermineSystem.cmake(74): if(CMAKE_HOST_WIN32 )
.../CMakeDetermineSystem.cmake(75): set(CMAKE_HOST_SYSTEM_NAME Windows )
.../CMakeDetermineSystem.cmake(76): if(DEFINED ENV{PROCESSOR_ARCHITEW6432} )
.../CMakeDetermineSystem.cmake(77): set(CMAKE_HOST_SYSTEM_PROCESSOR $ENV{PROCESSOR_ARCHITEW6432} )
.../CMakeDetermineSystem.cmake(88): if(CMAKE_TOOLCHAIN_FILE )
.../CMakeDetermineSystem.cmake(108): if(CMAKE_SYSTEM_NAME )
.../CMakeDetermineSystem.cmake(113): elseif(CMAKE_VS_WINCE_VERSION )
.../CMakeDetermineSystem.cmake(119): else()
.../CMakeDetermineSystem.cmake(120): set(CMAKE_SYSTEM_NAME ${CMAKE_HOST_SYSTEM_NAME} )
.../CMakeDetermineSystem.cmake(121): set(CMAKE_SYSTEM_VERSION ${CMAKE_HOST_SYSTEM_VERSION} )
.../CMakeDetermineSystem.cmake(122): set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR} )
.../CMakeDetermineSystem.cmake(123): set(CMAKE_CROSSCOMPILING FALSE )
.../CMakeDetermineSystem.cmake(124): set(PRESET_CMAKE_SYSTEM_NAME FALSE )
.../CMakeDetermineSystem.cmake(128): macro(ADJUST_CMAKE_SYSTEM_VARIABLES _PREFIX )
.../CMakeDetermineSystem.cmake(157): ADJUST_CMAKE_SYSTEM_VARIABLES(CMAKE_SYSTEM )
</snippet>

The problem is that most traced statements have an extra space added at the end of the traced statements. So, for example, "set(MSVC11 1)" is outputted in the trace file as "set(MSVC11 1 )" (note the extra space before the closing parenthesis). This is true for every statement except for the "else()" statement, which does not add the extra space.

The reason why this issue should be fixed is because on several occasions I have copied the traced statement and attempted to search for the statement using a text editor. The search will always fail because of the added space. In any case, it is proper for the exact trace statement to be outputted, not a modified version.
Run any CMake build, specifying the "--trace" option on the command line.
The only statement that does not add an undesired space is the "else()" statement.
No tags attached.
Issue History
2013-12-03 03:58Moshe RubinNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042440
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042440)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.