[CMake] COMMENT ignored for POST_BUILD custom command?

Chris Green greenc at fnal.gov
Fri Mar 20 11:47:49 EDT 2015


Hi,

With CMake 3.1.2, I don't see my specified COMMENT for a POST_BUILD 
command on a library target, viz:

     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})

The documentation doesn't suggest that this is intended behavior. Is 
this a bug, or am I doing something wrong? The desired action does get 
carried out during a build as desired, but there is no screen output of 
COMMENT to herald the generation of the link.

Thanks,
Chris.



More information about the CMake mailing list