File: 0005-Prevent-test-suite-failures-if-a-is-in-the-source-pa.patch

package info (click to toggle)
cmake 4.1.1%2Breally3.31.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 143,028 kB
  • sloc: ansic: 393,437; cpp: 288,767; sh: 3,958; yacc: 3,240; python: 3,015; lex: 1,337; asm: 438; f90: 429; lisp: 375; cs: 270; java: 266; perl: 217; objc: 212; xml: 198; fortran: 137; makefile: 97; javascript: 83; pascal: 63; tcl: 55; php: 25; ruby: 22
file content (84 lines) | stat: -rw-r--r-- 4,797 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Wed, 17 Sep 2025 16:28:57 +0200
Subject: Prevent test suite failures if a '+' is in the source path

---
 Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES-check.cmake  | 4 +++-
 .../RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath-check.cmake  | 3 ++-
 Tests/RunCMake/target_include_directories/include_after.cmake         | 3 ++-
 Tests/RunCMake/target_include_directories/include_before.cmake        | 3 ++-
 Tests/RunCMake/target_include_directories/include_default.cmake       | 3 ++-
 5 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES-check.cmake b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES-check.cmake
index ecf7bfe..b3a049c 100644
--- a/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES-check.cmake
+++ b/Tests/RunCMake/GenEx-TARGET_PROPERTY/INCLUDE_DIRECTORIES-check.cmake
@@ -2,7 +2,9 @@ file(READ "${RunCMake_TEST_BINARY_DIR}/out.txt" content)
 
 unset(RunCMake_TEST_FAILED)
 
-if (NOT content MATCHES "(INCLUDES1:${RunCMake_TEST_SOURCE_DIR}/include)")
+string(REGEX REPLACE "([][()+*^.$?|\\\\])" "\\\\\\1" regex_safe_dir "${RunCMake_TEST_SOURCE_DIR}")
+
+if (NOT content MATCHES "(INCLUDES1:${regex_safe_dir}/include)")
   string(APPEND RunCMake_TEST_FAILED "wrong content for INCLUDES1: \"${CMAKE_MATCH_1}\"\n")
 endif()
 
diff --git a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath-check.cmake b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath-check.cmake
index 814f405..1c0c352 100644
--- a/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath-check.cmake
+++ b/Tests/RunCMake/install/TARGETS-FILE_RPATH_CHANGE-old_rpath-check.cmake
@@ -3,8 +3,9 @@ skip_without_rpath_change_rule()
 string(APPEND prefix "${wsnl}" [[FILE "[^"]*/]])
 
 set(target "exe1")
+string(REGEX REPLACE "([][()+*^.$?|\\\\])" "\\\\\\1" regex_safe_dir "${RunCMake_BINARY_DIR}")
 string(CONCAT regex "${prefix}${target}\"${wsnl}"
-              [[OLD_RPATH "]] "${RunCMake_BINARY_DIR}")
+              [[OLD_RPATH "]] "${regex_safe_dir}")
 check()
 
 if("x${CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN}" STREQUAL "x\$ORIGIN")
diff --git a/Tests/RunCMake/target_include_directories/include_after.cmake b/Tests/RunCMake/target_include_directories/include_after.cmake
index 68a08a7..329eb72 100644
--- a/Tests/RunCMake/target_include_directories/include_after.cmake
+++ b/Tests/RunCMake/target_include_directories/include_after.cmake
@@ -12,7 +12,8 @@ target_include_directories(main AFTER PRIVATE "${after_include_dir}")
 
 get_target_property(actual_include_dirs main INCLUDE_DIRECTORIES)
 set(desired_include_dirs "${include_dir}" "${after_include_dir}")
+string(REGEX REPLACE "([][()+*^.$?|\\\\])" "\\\\\\1" desired_include_dirs_regex_safe "${desired_include_dirs}")
 
-if (NOT "${actual_include_dirs}" MATCHES "${desired_include_dirs}")
+if (NOT "${actual_include_dirs}" MATCHES "${desired_include_dirs_regex_safe}")
     message(SEND_ERROR "include after does not work")
 endif()
diff --git a/Tests/RunCMake/target_include_directories/include_before.cmake b/Tests/RunCMake/target_include_directories/include_before.cmake
index 9bebecd..aed7d70 100644
--- a/Tests/RunCMake/target_include_directories/include_before.cmake
+++ b/Tests/RunCMake/target_include_directories/include_before.cmake
@@ -12,7 +12,8 @@ target_include_directories(main BEFORE PRIVATE "${before_include_dir}")
 
 get_target_property(actual_include_dirs main INCLUDE_DIRECTORIES)
 set(desired_include_dirs "${before_include_dir}" "${include_dir}")
+string(REGEX REPLACE "([][()+*^.$?|\\\\])" "\\\\\\1" desired_include_dirs_regex_safe "${desired_include_dirs}")
 
-if (NOT "${actual_include_dirs}" MATCHES "${desired_include_dirs}")
+if (NOT "${actual_include_dirs}" MATCHES "${desired_include_dirs_regex_safe}")
     message(SEND_ERROR "include before does not work")
 endif()
diff --git a/Tests/RunCMake/target_include_directories/include_default.cmake b/Tests/RunCMake/target_include_directories/include_default.cmake
index 88b2502..55b6478 100644
--- a/Tests/RunCMake/target_include_directories/include_default.cmake
+++ b/Tests/RunCMake/target_include_directories/include_default.cmake
@@ -12,7 +12,8 @@ target_include_directories(main AFTER PRIVATE "${default_include_dir}")
 
 get_target_property(actual_include_dirs main INCLUDE_DIRECTORIES)
 set(desired_include_dirs "${include_dir}" "${default_include_dir}")
+string(REGEX REPLACE "([][()+*^.$?|\\\\])" "\\\\\\1" desired_include_dirs_regex_safe "${desired_include_dirs}")
 
-if (NOT "${actual_include_dirs}" MATCHES "${desired_include_dirs}")
+if (NOT "${actual_include_dirs}" MATCHES "${desired_include_dirs_regex_safe}")
     message(SEND_ERROR "include default does not work")
 endif()