diff options
author | Brad King <brad.king@kitware.com> | 2020-05-29 11:11:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-05-29 11:11:58 (GMT) |
commit | b8fe888c128d63df088db9d43885acfde04d47d6 (patch) | |
tree | 5992158cf08647117f68058f743d9da2b37c78fc /Modules | |
parent | da87557024a213a421623eee5af5138cccf60aa8 (diff) | |
parent | 2c0db404d17a239aa2d549ffeaf8fb1292d4d217 (diff) | |
download | CMake-b8fe888c128d63df088db9d43885acfde04d47d6.zip CMake-b8fe888c128d63df088db9d43885acfde04d47d6.tar.gz CMake-b8fe888c128d63df088db9d43885acfde04d47d6.tar.bz2 |
Merge topic 'FindSubversion-xcode-removed'
2c0db404d1 FindSubversion: Do not accept macOS stub without Xcode implementation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4813
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindSubversion.cmake | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake index ce280e2..07cb770 100644 --- a/Modules/FindSubversion.cmake +++ b/Modules/FindSubversion.cmake @@ -79,13 +79,22 @@ if(Subversion_SVN_EXECUTABLE) execute_process(COMMAND ${Subversion_SVN_EXECUTABLE} --version OUTPUT_VARIABLE Subversion_VERSION_SVN + ERROR_VARIABLE _Subversion_VERSION_STDERR + RESULT_VARIABLE _Subversion_VERSION_RESULT OUTPUT_STRIP_TRAILING_WHITESPACE) # restore the previous LC_ALL set(ENV{LC_ALL} ${_Subversion_SAVED_LC_ALL}) - string(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*" - "\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}") + if(_Subversion_VERSION_RESULT EQUAL 0) + string(REGEX REPLACE "^(.*\n)?svn, version ([.0-9]+).*" + "\\2" Subversion_VERSION_SVN "${Subversion_VERSION_SVN}") + else() + unset(Subversion_VERSION_SVN) + if(_Subversion_VERSION_STDERR MATCHES "svn: error: The subversion command line tools are no longer provided by Xcode") + set(Subversion_SVN_EXECUTABLE Subversion_SVN_EXECUTABLE-NOTFOUND) + endif() + endif() macro(Subversion_WC_INFO dir prefix) |