[cmake-developers] CustomCommand and collapsible paths.

Robert Maynard robert.maynard at kitware.com
Wed May 21 09:38:25 EDT 2014


This is a continuation of the object file generation issues that
FindCuda was seeing with CMake master.

The issue for FindCuda was in regards to directory paths being
normalized, which was added in commit 4959f3413c, but the issue is
actually more widespread with add_custom_command not collapsing any
OUTPUT or DEPENDS paths. This means that if add_custom_command outputs
the path "${CMAKE_CURRENT_BINARY_DIR}//./foo.h" and another custom
command DEPENDS on
"${CMAKE_CURRENT_BINARY_DIR}/foo.h" we fail to realize that these two
paths are the same and connect the two custom commands properly.

I have pushed a branch called normalize_custom_command_paths to stage
and I am interested in peoples feedback on how I solved this issue.


More information about the cmake-developers mailing list