summaryrefslogtreecommitdiff
path: root/dev-util/cmake/files/cmake-2.8.6-testsvn17.patch
blob: 77467676c841f41a7ee4f80e19ea46bdaf72661d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
diff --git a/Tests/CTestUpdateSVN.cmake.in b/Tests/CTestUpdateSVN.cmake.in
index 97b2a07..edafb4ef 100644
--- a/Tests/CTestUpdateSVN.cmake.in
+++ b/Tests/CTestUpdateSVN.cmake.in
@@ -23,6 +23,16 @@ file(MAKE_DIRECTORY ${TOP}/config)
 set(SVNCMD ${SVN} --config-dir ${TOP}/config)
 set(SVNUSER --username "test author" --non-interactive)
 
+# Configure for this svn version.
+execute_process(
+  COMMAND ${SVN} help add OUTPUT_VARIABLE help_add ERROR_VARIABLE help_add
+  )
+if("${help_add}" MATCHES "--depth")
+  set(depth_empty "--depth=empty")
+else()
+  set(depth_empty "")
+endif()
+
 #-----------------------------------------------------------------------------
 # Initialize the testing directory.
 message("Creating test directory...")
@@ -63,7 +73,7 @@ update_content(user-source files_added files_removed dirs_added)
 if(dirs_added)
   run_child(
     WORKING_DIRECTORY ${TOP}/user-source
-    COMMAND ${SVNCMD} add ${dirs_added}
+    COMMAND ${SVNCMD} add ${depth_empty} ${dirs_added}
     )
 endif(dirs_added)
 run_child(