summaryrefslogtreecommitdiffstats
path: root/config/cmake/CMakeFindJavaCommon.cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-06-19 14:15:19 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-06-19 14:15:19 (GMT)
commit27b3b4b208f73f07f14c5f7a288ba1d1545854f9 (patch)
tree4f23b252d92df4161d3520ba72c4261754b6bac2 /config/cmake/CMakeFindJavaCommon.cmake
parent1508656a2c5dc6f3c62b2dcc0565a498d76ea989 (diff)
downloadhdf5-27b3b4b208f73f07f14c5f7a288ba1d1545854f9.zip
hdf5-27b3b4b208f73f07f14c5f7a288ba1d1545854f9.tar.gz
hdf5-27b3b4b208f73f07f14c5f7a288ba1d1545854f9.tar.bz2
Synch with CMake original code
Diffstat (limited to 'config/cmake/CMakeFindJavaCommon.cmake')
-rw-r--r--config/cmake/CMakeFindJavaCommon.cmake27
1 files changed, 8 insertions, 19 deletions
diff --git a/config/cmake/CMakeFindJavaCommon.cmake b/config/cmake/CMakeFindJavaCommon.cmake
index fe6ee82..eabb622 100644
--- a/config/cmake/CMakeFindJavaCommon.cmake
+++ b/config/cmake/CMakeFindJavaCommon.cmake
@@ -1,41 +1,30 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See https://cmake.org/licensing for details.
-#=============================================================================
-# Copyright 2013-2014 Kitware, Inc.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of CMake, substitute the full
-# License text for the above reference.)
# Do not include this module directly from code outside CMake!
set(_JAVA_HOME "")
if(JAVA_HOME AND IS_DIRECTORY "${JAVA_HOME}")
set(_JAVA_HOME "${JAVA_HOME}")
set(_JAVA_HOME_EXPLICIT 1)
-else ()
+else()
set(_ENV_JAVA_HOME "")
if(DEFINED ENV{JAVA_HOME})
file(TO_CMAKE_PATH "$ENV{JAVA_HOME}" _ENV_JAVA_HOME)
- endif ()
+ endif()
if(_ENV_JAVA_HOME AND IS_DIRECTORY "${_ENV_JAVA_HOME}")
set(_JAVA_HOME "${_ENV_JAVA_HOME}")
set(_JAVA_HOME_EXPLICIT 1)
- else ()
+ else()
set(_CMD_JAVA_HOME "")
if(APPLE AND EXISTS /usr/libexec/java_home)
execute_process(COMMAND /usr/libexec/java_home
OUTPUT_VARIABLE _CMD_JAVA_HOME OUTPUT_STRIP_TRAILING_WHITESPACE)
- endif ()
+ endif()
if(_CMD_JAVA_HOME AND IS_DIRECTORY "${_CMD_JAVA_HOME}")
set(_JAVA_HOME "${_CMD_JAVA_HOME}")
set(_JAVA_HOME_EXPLICIT 0)
- endif ()
+ endif()
unset(_CMD_JAVA_HOME)
- endif ()
+ endif()
unset(_ENV_JAVA_HOME)
-endif ()
+endif()