From f3233ba5211596df205e6d915b06bd412087c202 Mon Sep 17 00:00:00 2001 From: Oliver Buchtala Date: Sun, 3 Apr 2011 00:21:44 +0200 Subject: Java: Create java_class_filelist only if it does't exist. Signed-off-by: Andreas Schneider --- Modules/UseJava.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake index 5d2e7b5..43ba668 100644 --- a/Modules/UseJava.cmake +++ b/Modules/UseJava.cmake @@ -285,7 +285,9 @@ function(add_jar _TARGET_NAME) endforeach(_JAVA_SOURCE_FILE) # create an empty java_class_filelist - file(WRITE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist "") + if (NOT EXISTS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist) + file(WRITE ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist "") + endif() # Add the target and make sure we have the latest resource files. add_custom_target(${_TARGET_NAME} ALL DEPENDS ${_JAVA_RESOURCE_FILES} ${_JAVA_DEPENDS}) -- cgit v0.12