Added rosbuild_premsgsrvgen target, and made client lib code generation

depend on it, #2135.
This commit is contained in:
Brian Gerkey 2010-05-20 01:45:28 +00:00
parent f860f9e333
commit ebe4ccc364
5 changed files with 27 additions and 4 deletions

View File

@ -353,7 +353,7 @@ macro(_rosbuild_add_library lib libname type)
rosbuild_add_compile_flags(${lib} ${ROS_COMPILE_FLAGS})
rosbuild_add_link_flags(${lib} ${ROS_LINK_FLAGS})
# Make sure to do any prebuild working (e.g., msg/srv generation) before
# Make sure to do any prebuild work (e.g., msg/srv generation) before
# building this target.
add_dependencies(${lib} rosbuild_precompile)
endmacro(_rosbuild_add_library)

View File

@ -326,6 +326,11 @@ macro(rosbuild_init)
add_custom_target(rospack_genmsg)
add_custom_target(rospack_gensrv)
# Add a target that will fire before doing message or service generation.
# This is used by packages that do automatic generation of message and
# service files.
add_custom_target(rosbuild_premsgsrvgen)
# Add a target that will fire before compiling anything. This is used by
# message and service generation, as well as things outside of ros, like
# dynamic_reconfigure.
@ -466,7 +471,7 @@ macro(rosbuild_add_executable exe)
rosbuild_add_compile_flags(${exe} ${ROS_COMPILE_FLAGS})
rosbuild_add_link_flags(${exe} ${ROS_LINK_FLAGS})
# Make sure to do any prebuild working (e.g., msg/srv generation) before
# Make sure to do any prebuild work (e.g., msg/srv generation) before
# building this target.
add_dependencies(${exe} rosbuild_precompile)

View File

@ -25,8 +25,11 @@ macro(genmsg_cpp)
# Create a target that depends on the union of all the autogenerated
# files
add_custom_target(ROSBUILD_genmsg_cpp DEPENDS ${_autogen})
# Add our target to the top-level genmsg target, which will be fired if
# the user calls genmsg()
# Make our target depend on rosbuild_premsgsrvgen, to allow any
# pre-msg/srv generation steps to be done first.
add_dependencies(ROSBUILD_genmsg_cpp rosbuild_premsgsrvgen)
# Add our target to the top-level rospack_genmsg target, which will be
# fired if the user calls genmsg()
add_dependencies(rospack_genmsg ROSBUILD_genmsg_cpp)
endmacro(genmsg_cpp)
@ -58,6 +61,9 @@ macro(gensrv_cpp)
# Create a target that depends on the union of all the autogenerated
# files
add_custom_target(ROSBUILD_gensrv_cpp DEPENDS ${_autogen})
# Make our target depend on rosbuild_premsgsrvgen, to allow any
# pre-msg/srv generation steps to be done first.
add_dependencies(ROSBUILD_gensrv_cpp rosbuild_premsgsrvgen)
# Add our target to the top-level gensrv target, which will be fired if
# the user calls gensrv()
add_dependencies(rospack_gensrv ROSBUILD_gensrv_cpp)

View File

@ -27,6 +27,9 @@ macro(genmsg_lisp)
# Create a target that depends on the union of all the autogenerated
# files
add_custom_target(ROSBUILD_genmsg_lisp DEPENDS ${_autogen})
# Make our target depend on rosbuild_premsgsrvgen, to allow any
# pre-msg/srv generation steps to be done first.
add_dependencies(ROSBUILD_genmsg_lisp rosbuild_premsgsrvgen)
# Add our target to the top-level genmsg target, which will be fired if
# the user calls genmsg()
add_dependencies(rospack_genmsg ROSBUILD_genmsg_lisp)
@ -63,6 +66,9 @@ macro(gensrv_lisp)
# Create a target that depends on the union of all the autogenerated
# files
add_custom_target(ROSBUILD_gensrv_lisp DEPENDS ${_autogen})
# Make our target depend on rosbuild_premsgsrvgen, to allow any
# pre-msg/srv generation steps to be done first.
add_dependencies(ROSBUILD_gensrv_lisp rosbuild_premsgsrvgen)
# Add our target to the top-level gensrv target, which will be fired if
# the user calls gensrv()
add_dependencies(rospack_gensrv ROSBUILD_gensrv_lisp)

View File

@ -37,6 +37,9 @@ macro(genmsg_py)
# A target that depends on generation of the __init__.py
add_custom_target(ROSBUILD_genmsg_py DEPENDS ${_output_py})
# Make our target depend on rosbuild_premsgsrvgen, to allow any
# pre-msg/srv generation steps to be done first.
add_dependencies(ROSBUILD_genmsg_py rosbuild_premsgsrvgen)
# Add our target to the top-level genmsg target, which will be fired if
# the user calls genmsg()
add_dependencies(rospack_genmsg ROSBUILD_genmsg_py)
@ -83,6 +86,9 @@ macro(gensrv_py)
# A target that depends on generation of the __init__.py
add_custom_target(ROSBUILD_gensrv_py DEPENDS ${_output_py})
# Make our target depend on rosbuild_premsgsrvgen, to allow any
# pre-msg/srv generation steps to be done first.
add_dependencies(ROSBUILD_gensrv_py rosbuild_premsgsrvgen)
# Add our target to the top-level gensrv target, which will be fired if
# the user calls gensrv()
add_dependencies(rospack_gensrv ROSBUILD_gensrv_py)