summaryrefslogtreecommitdiffstats
path: root/Modules/ExternalProject.cmake
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2010-05-26 18:50:19 (GMT)
committerDavid Cole <david.cole@kitware.com>2010-05-26 18:50:19 (GMT)
commit672d9ba78cad1dabdf903596fdfc15d41bc5f341 (patch)
tree2fe38612b989a8b80ff079a528b5da83b1b3de96 /Modules/ExternalProject.cmake
parent515339f3138721be5cd15dd7dee9ef5fe4f50b1b (diff)
downloadCMake-672d9ba78cad1dabdf903596fdfc15d41bc5f341.zip
CMake-672d9ba78cad1dabdf903596fdfc15d41bc5f341.tar.gz
CMake-672d9ba78cad1dabdf903596fdfc15d41bc5f341.tar.bz2
Add svn user name and password to ExternalProject.
Thanks to JCFR for the leg work.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r--Modules/ExternalProject.cmake14
1 files changed, 11 insertions, 3 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 0302d5c..6479f4a 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -16,6 +16,8 @@
# [CVS_TAG tag] # Tag to checkout from CVS repo
# [SVN_REPOSITORY url] # URL of Subversion repo
# [SVN_REVISION rev] # Revision to checkout from Subversion repo
+# [SVN_USERNAME john ] # Username for Subversion checkout and update
+# [SVN_PASSWORD doe ] # Password for Subversion checkout and update
# [URL /.../src.tgz] # Full path or URL of source
# [TIMEOUT seconds] # Time allowed for file download operations
# #--Update/Patch step----------
@@ -661,8 +663,10 @@ function(_ep_add_download_command name)
endif()
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(repository ${svn_repository})
+ set(repository "${svn_repository} user=${svn_username} password=${svn_password}")
set(module)
set(tag ${svn_revision})
configure_file(
@@ -674,7 +678,8 @@ 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(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision} ${src_name})
+ set(cmd ${Subversion_SVN_EXECUTABLE} co ${svn_repository} ${svn_revision}
+ --username=${svn_username} --password=${svn_password} ${src_name})
list(APPEND depends ${stamp_dir}/${name}-svninfo.txt)
elseif(url)
get_filename_component(work_dir "${source_dir}" PATH)
@@ -757,7 +762,10 @@ function(_ep_add_update_command name)
set(work_dir ${source_dir})
set(comment "Performing update step (SVN update) for '${name}'")
get_property(svn_revision TARGET ${name} PROPERTY _EP_SVN_REVISION)
- set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision})
+ get_property(svn_username TARGET ${name} PROPERTY _EP_SVN_USERNAME)
+ get_property(svn_password TARGET ${name} PROPERTY _EP_SVN_PASSWORD)
+ set(cmd ${Subversion_SVN_EXECUTABLE} up ${svn_revision}
+ --username=${svn_username} --password=${svn_password})
set(always 1)
endif()