zeek / cmake

CMake scripts used in Zeek
https://www.zeek.org
Other
48 stars 59 forks source link

Escape special characters in paths before using them as regexes #42

Closed timwoj closed 2 years ago

timwoj commented 2 years ago

Part of https://github.com/zeek/zeek/issues/1453. Without escaping these characters before trying to use the path as a regex, you get this error message:

CMake Error at cmake/BifCl.cmake:143 (string):
  string sub-command REGEX, mode REPLACE failed to compile regex
  "/Users/tim/Desktop/c++/zeek/build/src/".
Call Stack (most recent call first):
  cmake/ZeekPluginStatic.cmake:8 (bif_target)
  cmake/ZeekPluginCommon.cmake:144 (bro_plugin_bif_static)
  src/analyzer/protocol/smb/CMakeLists.txt:8 (zeek_plugin_bif)