[cmake-developers] [CMake 0015461]: Ninja generator does not honor COMMENT for TARGET POST_BUILD commands
Mantis Bug Tracker
mantis at public.kitware.com
Fri Mar 20 15:37:46 EDT 2015
The following issue has been SUBMITTED.
======================================================================
http://www.cmake.org/Bug/view.php?id=15461
======================================================================
Reported By: Chris Green
Assigned To:
======================================================================
Project: CMake
Issue ID: 15461
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2015-03-20 15:37 EDT
Last Modified: 2015-03-20 15:37 EDT
======================================================================
Summary: Ninja generator does not honor COMMENT for TARGET
POST_BUILD commands
Description:
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.
Steps to Reproduce:
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.
Additional Information:
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()
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2015-03-20 15:37 Chris Green New Issue
======================================================================
More information about the cmake-developers
mailing list