summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-08-20 15:24:37 (GMT)
committerKitware Robot <kwrobot@kitware.com>2024-08-20 15:24:44 (GMT)
commit9570ff0c7c32fc2b49a37d78a892e1fa0aa98495 (patch)
tree2918ff6b8fadc8367fbfa0b4614d1a9343be66bf
parent42fb1785067690150471bc2de4f15c9b788a90d8 (diff)
parent7402593a08aaa0cedacad8390bd0082c7137d706 (diff)
downloadCMake-9570ff0c7c32fc2b49a37d78a892e1fa0aa98495.zip
CMake-9570ff0c7c32fc2b49a37d78a892e1fa0aa98495.tar.gz
CMake-9570ff0c7c32fc2b49a37d78a892e1fa0aa98495.tar.bz2
Merge topic 'FindJNI-no-xcode' into release-3.30
7402593a08 FindJNI: Improve output on macOS if Xcode is not installed Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !9750
-rw-r--r--Modules/FindJNI.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FindJNI.cmake b/Modules/FindJNI.cmake
index 51f05b9..82e3d88 100644
--- a/Modules/FindJNI.cmake
+++ b/Modules/FindJNI.cmake
@@ -391,8 +391,10 @@ if(APPLE)
execute_process(
COMMAND xcodebuild -version
OUTPUT_VARIABLE _FindJNI_XCODEBUILD_VERSION
+ ERROR_VARIABLE _FindJNI_XCODEBUILD_VERSION
+ RESULT_VARIABLE _FindJNI_XCODEBUILD_RESULT
)
- if(_FindJNI_XCODEBUILD_VERSION MATCHES "Xcode ([0-9]+(\\.[0-9]+)*)")
+ if(_FindJNI_XCODEBUILD_RESULT EQUAL 0 AND _FindJNI_XCODEBUILD_VERSION MATCHES "Xcode ([0-9]+(\\.[0-9]+)*)")
set(_FindJNI_XCODE_VERSION "${CMAKE_MATCH_1}")
else()
set(_FindJNI_XCODE_VERSION "")