summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-10-03 13:10:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-10-03 13:10:50 (GMT)
commit4a68c85073f80fd8f96c93eb5b3ead3058c84391 (patch)
tree206dab44495f9d71096fb8e44047d06de4229f96 /Modules
parent2921c5e4d102a3429b1e36ffd15715edaa46ef3f (diff)
parent3d025939868a9722e889e3b4361b56d4c4138025 (diff)
downloadCMake-4a68c85073f80fd8f96c93eb5b3ead3058c84391.zip
CMake-4a68c85073f80fd8f96c93eb5b3ead3058c84391.tar.gz
CMake-4a68c85073f80fd8f96c93eb5b3ead3058c84391.tar.bz2
Merge topic 'FindJava-all-versions'
3d02593986 FindJava: ensure all versions can be found 14ac253af7 FindJava: tests clean-up Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3871
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindJNI.cmake2
-rw-r--r--Modules/FindJava.cmake4
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 237ea96..3a5bd31 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -143,7 +143,7 @@ endif()
if (WIN32)
set (_JNI_HINTS)
- execute_process(COMMAND REG QUERY HKLM\\SOFTWARE\\JavaSoft\\JDK /f "." /k
+ execute_process(COMMAND REG QUERY HKLM\\SOFTWARE\\JavaSoft\\JDK
RESULT_VARIABLE _JNI_RESULT
OUTPUT_VARIABLE _JNI_VERSIONS
ERROR_QUIET)
diff --git a/Modules/FindJava.cmake b/Modules/FindJava.cmake
index 0d62cd6..945df3c 100644
--- a/Modules/FindJava.cmake
+++ b/Modules/FindJava.cmake
@@ -85,7 +85,7 @@ if(_JAVA_HOME)
endif()
if (WIN32)
macro (_JAVA_GET_INSTALLED_VERSIONS _KIND)
- execute_process(COMMAND REG QUERY HKLM\\SOFTWARE\\JavaSoft\\${_KIND} /f "." /k
+ execute_process(COMMAND REG QUERY HKLM\\SOFTWARE\\JavaSoft\\${_KIND}
RESULT_VARIABLE _JAVA_RESULT
OUTPUT_VARIABLE _JAVA_VERSIONS
ERROR_QUIET)
@@ -153,7 +153,7 @@ find_program(Java_JAVA_EXECUTABLE
)
if(Java_JAVA_EXECUTABLE)
- execute_process(COMMAND ${Java_JAVA_EXECUTABLE} -version
+ execute_process(COMMAND "${Java_JAVA_EXECUTABLE}" -version
RESULT_VARIABLE res
OUTPUT_VARIABLE var
ERROR_VARIABLE var # sun-java output to stderr