diff options
author | David Cole <david.cole@kitware.com> | 2010-10-28 18:10:01 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2010-10-28 18:10:01 (GMT) |
commit | ec93cd2ead86ea068577105a1903f92d604b6912 (patch) | |
tree | 6e24a6ed98b769719ba24b871d664f5c35864e56 | |
parent | 5b43d8f8b1cfd3e3acf1576b5bf2f910fb3c50db (diff) | |
parent | 6e1282f840fe50707c928079465ab315f07a59fe (diff) | |
download | CMake-ec93cd2ead86ea068577105a1903f92d604b6912.zip CMake-ec93cd2ead86ea068577105a1903f92d604b6912.tar.gz CMake-ec93cd2ead86ea068577105a1903f92d604b6912.tar.bz2 |
Merge topic 'fix-11173'
6e1282f ExternalProject: No svn --username if empty (#11173)
-rw-r--r-- | Modules/ExternalProject.cmake | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index dfd96cd..997164a 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -984,8 +984,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) @@ -1124,8 +1131,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) |