Skip to content
Snippets Groups Projects
Commit 7552ce3e authored by Guilherme Amadio's avatar Guilherme Amadio
Browse files

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.
parent e9968cdc
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment