Skip to content

Commit 71de29a

Browse files
committed
genjava-extras.camke.em: do not run genjava when three is no message to build
1 parent 92fcdcd commit 71de29a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmake/genjava-extras.cmake.em

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,16 @@ macro(_generate_module_java ARG_PKG ARG_GEN_OUTPUT_DIR ARG_GENERATED_FILES)
5252
# So we leave this dropping to inform it when gradle needs to run so that we can skip by
5353
# without the huge latency whenever we don't.
5454
set(DROPPINGS_FILE "${GRADLE_BUILD_DIR}/${ARG_PKG}/droppings")
55-
add_custom_command(OUTPUT ${GRADLE_BUILD_FILE}
55+
if ( NOT "${ARG_GENERATED_FILES}" STREQUAL "" )
56+
add_custom_command(OUTPUT ${GRADLE_BUILD_FILE}
5657
DEPENDS ${GENJAVA_BIN} ${ARG_GENERATED_FILES}
5758
COMMAND ${CATKIN_ENV} ${PYTHON_EXECUTABLE} ${GENJAVA_BIN}
5859
-o ${GRADLE_BUILD_DIR}
5960
-p ${ARG_PKG}
6061
COMMAND touch ${DROPPINGS_FILE}
6162
COMMENT "Generating Java gradle project from ${ARG_PKG}"
62-
)
63+
)
64+
endif()
6365

6466
################################
6567
# Compile Gradle Subproject

0 commit comments

Comments
 (0)