Skip to content

Commit 1bf0146

Browse files
committed
Add comment explaining target dependency
1 parent c8dbeae commit 1bf0146

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

rosidl_generator_py/cmake/custom_command.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# Unlike other generators, this custom command depends on the target
16+
# ${rosidl_generate_interfaces_TARGET} and not the IDL files.
17+
# The IDL files could be generated files,as they are for .action files.
18+
# CMake does not allow `add_custom_command()` to depend on files generated in
19+
# a different CMake subdirectory, and this command is invoked after an
20+
# add_subdirectory() call.
1521
add_custom_command(
1622
OUTPUT ${_generated_extension_files} ${_generated_msg_py_files} ${_generated_msg_c_files} ${_generated_srv_py_files} ${_generated_srv_c_files} ${_generated_action_py_files} ${_generated_action_c_files}
1723
COMMAND ${PYTHON_EXECUTABLE} ${rosidl_generator_py_BIN}

0 commit comments

Comments
 (0)