Bug 203564 - WEBKIT_WRAP_SOURCELIST does not escape filesystem paths when compiling regex
Summary: WEBKIT_WRAP_SOURCELIST does not escape filesystem paths when compiling regex
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Nightly Build
Hardware: PC Linux
: P2 Minor
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-29 08:56 PDT by Michael Catanzaro
Modified: 2020-12-07 12:30 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2019-10-29 08:56:58 PDT
In order to test https://gitlab.gnome.org/GNOME/glib/issues/1379 I tried building WebKit in a build directory named "build++" instead of something more traditional like "build". It uncovered this bug in WEBKIT_WRAP_SOURCELIST:


-- Platform-specific CMakeLists not found: /home/mcatanzaro/Projects/WebKit/Source/bmalloc/PlatformGTK.cmake
RegularExpression::compile(): Nested *?+.
RegularExpression::compile(): Error in compile.
CMake Error at Source/cmake/WebKitMacros.cmake:130 (if):
  if given arguments:

    "NOT" "_file" "MATCHES" "/home/mcatanzaro/Projects/WebKit/build++/DerivedSources/WebCore"

  Regular expression
  "/home/mcatanzaro/Projects/WebKit/build++/DerivedSources/WebCore" cannot
  compile
Call Stack (most recent call first):
  Source/bmalloc/CMakeLists.txt:158 (WEBKIT_WRAP_SOURCELIST)


where the + characters from the filename are interpreted as if part of a regex. Presumably they should be escaped somehow.
Comment 1 Konstantin Tokarev 2019-11-07 02:56:07 PST
Here is a way how it presumably should be escaped: https://gitlab.kitware.com/cmake/cmake/issues/18580#note_483128
Comment 2 Don Olmstead 2020-12-07 12:30:43 PST
Macro removed in r270516 <https://trac.webkit.org/changeset/270516/webkit>