summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-11 12:18:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-11 12:18:50 (GMT)
commit027bcee513788b5ab17c3328a14cb8ac8354ba00 (patch)
tree738d61521bf4bb754614e7f76cdf388c7a1eb050 /Modules
parent5d6ba8f2daab9ebff570f36908d48defdf37d607 (diff)
parentdead049e0b4ff531866ef9bf362f3f5e8fb177aa (diff)
downloadCMake-027bcee513788b5ab17c3328a14cb8ac8354ba00.zip
CMake-027bcee513788b5ab17c3328a14cb8ac8354ba00.tar.gz
CMake-027bcee513788b5ab17c3328a14cb8ac8354ba00.tar.bz2
Merge topic 'UseJava_OUTPUT_DIR'
dead049e UseJava: OUTPUT_DIR must exists in all cases. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1368
Diffstat (limited to 'Modules')
-rw-r--r--Modules/UseJava.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 1182875..b925ee2 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -516,6 +516,8 @@ function(add_jar _TARGET_NAME)
endforeach()
set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${_add_jar_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir")
+ # ensure output directory exists
+ file (MAKE_DIRECTORY "${CMAKE_JAVA_CLASS_OUTPUT_PATH}")
set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}.jar")
if (_add_jar_OUTPUT_NAME AND _add_jar_VERSION)