summaryrefslogtreecommitdiffstats
path: root/config/cmake/UseJava.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-11-01 18:41:44 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-11-01 18:41:44 (GMT)
commitf8fd6d0b41a242aae93689e1477478bc78bae471 (patch)
treed85ec9fabc353b7b401f48216000cbc37b7835f6 /config/cmake/UseJava.cmake
parent930cfc402dc2f17b1dbe9a6b3c5e15b95cc4c7ea (diff)
downloadhdf5-f8fd6d0b41a242aae93689e1477478bc78bae471.zip
hdf5-f8fd6d0b41a242aae93689e1477478bc78bae471.tar.gz
hdf5-f8fd6d0b41a242aae93689e1477478bc78bae471.tar.bz2
Correct usage of MPI vars
Diffstat (limited to 'config/cmake/UseJava.cmake')
-rw-r--r--config/cmake/UseJava.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/config/cmake/UseJava.cmake b/config/cmake/UseJava.cmake
index 9b3bf02..52b37a9 100644
--- a/config/cmake/UseJava.cmake
+++ b/config/cmake/UseJava.cmake
@@ -482,6 +482,8 @@ function(add_jar _TARGET_NAME)
else()
get_filename_component(_add_jar_OUTPUT_DIR ${_add_jar_OUTPUT_DIR} ABSOLUTE)
endif()
+ # ensure output directory exists
+ file (MAKE_DIRECTORY "${_add_jar_OUTPUT_DIR}")
if (_add_jar_ENTRY_POINT)
set(_ENTRY_POINT_OPTION e)
@@ -516,7 +518,7 @@ function(add_jar _TARGET_NAME)
set(CMAKE_JAVA_INCLUDE_PATH_FINAL "${CMAKE_JAVA_INCLUDE_PATH_FINAL}${CMAKE_JAVA_INCLUDE_FLAG_SEP}${JAVA_INCLUDE_DIR}")
endforeach()
- set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${_add_jar_OUTPUT_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir")
+ set(CMAKE_JAVA_CLASS_OUTPUT_PATH "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${_TARGET_NAME}.dir")
set(_JAVA_TARGET_OUTPUT_NAME "${_TARGET_NAME}.jar")
if (_add_jar_OUTPUT_NAME AND _add_jar_VERSION)
@@ -547,7 +549,7 @@ function(add_jar _TARGET_NAME)
list(APPEND _JAVA_COMPILE_FILELISTS ${_JAVA_FULL})
elseif (_JAVA_EXT MATCHES ".java")
- file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${_add_jar_OUTPUT_DIR} ${_JAVA_FULL})
+ file(RELATIVE_PATH _JAVA_REL_BINARY_PATH ${CMAKE_CURRENT_BINARY_DIR} ${_JAVA_FULL})
file(RELATIVE_PATH _JAVA_REL_SOURCE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${_JAVA_FULL})
string(LENGTH ${_JAVA_REL_BINARY_PATH} _BIN_LEN)
string(LENGTH ${_JAVA_REL_SOURCE_PATH} _SRC_LEN)