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                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to