Commit 7552ce3
committed
Escape special characters before using source/build dirs in regex
If "^${CMAKE_SOURCE_DIR}" contains special characters, the regular
expression will break with an error like this for Garfield++:
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at .../RootNewMacros.cmake:288 (if):
if given arguments:
"NOT" "IS_ABSOLUTE" "incdir"
"OR" "incdir" "MATCHES" "^/<...>/src/Garfield++/HEAD"
"OR" "incdir" "MATCHES" "^"
"OR" "incdir" "MATCHES" "^"
Regular expression
"^/<...>/src/Garfield++/HEAD"
cannot compile
Call Stack (most recent call first):
CMakeLists.txt:118 (ROOT_GENERATE_DICTIONARY)
Also, the (current) build directory is CMAKE_(CURRENT_)BINARY_DIR.
Related Jira issue: ROOT-10210.1 parent e9968cd commit 7552ce3
1 file changed
+7
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
293 | 296 | | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
298 | 301 | | |
299 | 302 | | |
300 | 303 | | |
| |||
0 commit comments