summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-14 13:39:29 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-04-14 13:39:37 (GMT)
commitce9777c62f44db1f198348b5e351cb7bfb802c1c (patch)
tree5d8f52f119d7f81074090b05efc575a2d6cb0a03 /Modules
parentdeba768e1443d6aae0ccc640d5e50d42657aaf92 (diff)
parent01d5b888a390ea91478cc0b17c08e565b2c226ee (diff)
downloadCMake-ce9777c62f44db1f198348b5e351cb7bfb802c1c.zip
CMake-ce9777c62f44db1f198348b5e351cb7bfb802c1c.tar.gz
CMake-ce9777c62f44db1f198348b5e351cb7bfb802c1c.tar.bz2
Merge topic 'UseJava-quoting'
01d5b888a3 UseJava: Quote -classpath argument correctly on more platforms Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Marc Chevrier <marc.chevrier@gmail.com> Merge-request: !4597
Diffstat (limited to 'Modules')
-rw-r--r--Modules/UseJava.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 9177d16..db3fb95 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -377,7 +377,9 @@ function (__java_copy_file src dest comment)
ARGS ${src}
${dest}
DEPENDS ${src}
- COMMENT ${comment})
+ COMMENT ${comment}
+ VERBATIM
+ )
endfunction ()
function(__java_lcat VAR)
@@ -615,7 +617,7 @@ function(add_jar _TARGET_NAME)
OUTPUT ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
COMMAND ${CMAKE_COMMAND}
-DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH}
- -DCMAKE_JAR_CLASSES_PREFIX="${CMAKE_JAR_CLASSES_PREFIX}"
+ -DCMAKE_JAR_CLASSES_PREFIX=${CMAKE_JAR_CLASSES_PREFIX}
-P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/UseJava/ClearClassFiles.cmake
COMMAND ${Java_JAVAC_EXECUTABLE}
${CMAKE_JAVA_COMPILE_FLAGS}
@@ -627,15 +629,17 @@ function(add_jar _TARGET_NAME)
DEPENDS ${_JAVA_COMPILE_FILES} ${_JAVA_COMPILE_FILELISTS} ${_JAVA_COMPILE_DEPENDS} ${_JAVA_SOURCES_FILE}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Building Java objects for ${_TARGET_NAME}.jar"
+ VERBATIM
)
add_custom_command(
OUTPUT ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist
COMMAND ${CMAKE_COMMAND}
-DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH}
- -DCMAKE_JAR_CLASSES_PREFIX="${CMAKE_JAR_CLASSES_PREFIX}"
+ -DCMAKE_JAR_CLASSES_PREFIX=${CMAKE_JAR_CLASSES_PREFIX}
-P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/UseJavaClassFilelist.cmake
DEPENDS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ VERBATIM
)
else ()
# create an empty java_class_filelist
@@ -666,6 +670,7 @@ function(add_jar _TARGET_NAME)
DEPENDS ${_JAVA_RESOURCE_FILES} ${_JAVA_DEPENDS} ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist
WORKING_DIRECTORY ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
COMMENT "Creating Java archive ${_JAVA_TARGET_OUTPUT_NAME}"
+ VERBATIM
)
else ()
add_custom_command(
@@ -681,6 +686,7 @@ function(add_jar _TARGET_NAME)
WORKING_DIRECTORY ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
DEPENDS ${_JAVA_RESOURCE_FILES} ${_JAVA_DEPENDS} ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_class_filelist
COMMENT "Creating Java archive ${_JAVA_TARGET_OUTPUT_NAME}"
+ VERBATIM
)
endif ()