MantisBT - CMake
View Issue Details
0015461CMakeCMakepublic2015-03-20 15:372016-06-10 14:31
Chris Green 
Kitware Robot 
normalminoralways
closedmoved 
x86-64OS X10.10.2
CMake 3.2.1 
 
0015461: Ninja generator does not honor COMMENT for TARGET POST_BUILD commands
Upon adding a TARGET POST_BUILD command to make an alias link for a built library, the Ninja system does not print my defined COMMENT.
Define a custom command as a POST_BUILD command to (e.g.) a library target, and define a COMMENT.

Run CMake -GNinja.

Run ninja > log.txt 2>&1

Fail to see your COMMENT in log.txt.
The COMMENT is printed as expected with the UNIX Makefile generator in CMake 3.2.1.

The actual command we used:

function(cet_lib_alias LIB_TARGET)
  foreach(alias ${ARGN})
    add_custom_command(TARGET ${LIB_TARGET}
      POST_BUILD
      COMMAND ln -sf $<TARGET_LINKER_FILE_NAME:${LIB_TARGET}>
      ${CMAKE_SHARED_LIBRARY_PREFIX}${alias}${CMAKE_SHARED_LIBRARY_SUFFIX}
      COMMENT "Generate / refresh courtesy link ${CMAKE_SHARED_LIBRARY_PREFIX}${alias}${CMAKE_SHARED_LIBRARY_SUFFIX} -> $<TARGET_LINKER_FILE_NAME:${LIB_TARGET}>"
      VERBATIM
      WORKING_DIRECTORY ${LIBRARY_OUTPUT_PATH})
  endforeach()
endfunction()
No tags attached.
Issue History
2015-03-20 15:37Chris GreenNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042737
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
(0042737)
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.