View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015715CMakeCMakepublic2015-08-27 21:262016-06-10 14:31
Reportershuaiw 
Assigned ToKitware Robot 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformIntel X86-64OSLinux 2.6.32OS VersionCentOS 6.4
Product VersionCMake 3.3.1 
Target VersionFixed in Version 
Summary0015715: COMMAND item of "add_custom_command" produce incorrect build.make
Descriptionadd_custom_command(OUTPUT xele_mdapi.signature
        COMMAND echo Xele-MD API Revision:${LASTREV} | tee xele_mdapi.signature
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
        VERBATIM
        COMMENT "Produce signature"
)
Steps To Reproducebuild in clion 1.1 OR
enter ${CMAKE_HOME_DIRECTORY}/_build
cmake ..
Additional Informationpartof generated build.make:
XeleMdAPI64/xele_mdapi.signature:
    @$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --blue --bold --progress-dir=/home/shuaiw/sw/trunk/xele_md/modules/xeleAPI-NMR-CMake/_build/CMakeFiles --progress-num=$(CMAKE_PROGRESS_3) "Produce signature"
    cd /home/shuaiw/sw/trunk/xele_md/modules/xeleAPI-NMR-CMake/XeleMdAPI64 && echo Xele-MD API Revision:820
 | tee xele_mdapi.signature ## this is newline
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0039341)
shuaiw (reporter)
2015-08-27 23:05

also happens in COMMAND ${CMAKE_COMMAND} -P gen.cmake -D${last_rev}
COMMAND ${CMAKE_COMMAND} -P gen2.cmake ${curr_date} targetFile
if do not use variable , build.make is correct
(0039343)
Brad King (manager)
2015-08-28 08:46

How is the value of LASTREV computed? I suspect it has a newline in it. If it comes from execute_process, consider using OUTPUT_STRIP_TRAILING_WHITESPACE.
(0042829)
Kitware Robot (administrator)
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.

 Issue History
Date Modified Username Field Change
2015-08-27 21:26 shuaiw New Issue
2015-08-27 23:05 shuaiw Note Added: 0039341
2015-08-28 08:46 Brad King Note Added: 0039343
2016-06-10 14:29 Kitware Robot Note Added: 0042829
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team