diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2019-10-01 10:44:26 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2019-10-02 12:47:11 (GMT) |
commit | 3d025939868a9722e889e3b4361b56d4c4138025 (patch) | |
tree | 0d147d669382ebd75a65561b089d327509d46833 /Modules/FindJava.cmake | |
parent | 14ac253af716432d20380d155131fa6fd6d03400 (diff) | |
download | CMake-3d025939868a9722e889e3b4361b56d4c4138025.zip CMake-3d025939868a9722e889e3b4361b56d4c4138025.tar.gz CMake-3d025939868a9722e889e3b4361b56d4c4138025.tar.bz2 |
FindJava: ensure all versions can be found
Fixes: #19765
Diffstat (limited to 'Modules/FindJava.cmake')
-rw-r--r-- | Modules/FindJava.cmake | 4 |
1 files changed, 2 insertions, 2 deletions
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 |