summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-10-22 20:09:07 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-10-22 20:23:27 (GMT)
commit6e1282f840fe50707c928079465ab315f07a59fe (patch)
tree96ea819d011405eabf67b70b421091cdc70f9f1f /Modules/ExternalProject.cmake
parent91b5bc3efa814ba27cbc52280edc363f8991d0cc (diff)
downloadCMake-6e1282f840fe50707c928079465ab315f07a59fe.zip
CMake-6e1282f840fe50707c928079465ab315f07a59fe.tar.gz
CMake-6e1282f840fe50707c928079465ab315f07a59fe.tar.bz2
ExternalProject: No svn --username if empty (#11173)
Nor --password. But please do if non-empty. Thank you.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake18
1 files changed, 16 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index d76796f..f3c907f 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -985,8 +985,15 @@ function(_ep_add_download_command name)
get_filename_component(src_name "${source_dir}" NAME)
get_filename_component(work_dir "${source_dir}" PATH)
set(comment "Performing download step (SVN checkout) for '${name}'")
+ set(svn_user_pw_args "")
+ if(svn_username)
+ set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
+ endif()
+ if(svn_password)
+ set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
+ endif()
set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
- --username=${svn_username} --password=${svn_password} ${src_name})
+ ${svn_user_pw_args} ${src_name})
list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
elseif(git_repository)
find_package(Git)
@@ -1125,8 +1132,15 @@ function(_ep_add_update_command name)
get_property(svn_revision TARGET ${name} PROPERTY _EP_SVN_REVISION)
get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
+ set(svn_user_pw_args "")
+ if(svn_username)
+ set(svn_user_pw_args ${svn_user_pw_args} "--username=${svn_username}")
+ endif()
+ if(svn_password)
+ set(svn_user_pw_args ${svn_user_pw_args} "--password=${svn_password}")
+ endif()
set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}
- --username=${svn_username} --password=${svn_password})
+ ${svn_user_pw_args})
set(always 1)
elseif(git_repository)
if(NOT GIT_EXECUTABLE)