I'm trying to set up a library with CMake 3.11 and I'm getting a compilation error of a REGEX string, the project requests FLEX 2.5 with the function find_package
:
find_package(FLEX 2.5 REQUIRED)
This call uses the FindFLEX.cmake module, line 137 of this module has the statement that generates the error:
string(REGEX REPLACE "^.*${FLEX_EXE_NAME_WE}(${FLEX_EXE_EXT})?\"? (version )?([0-9]+[^ ]*)( .*)?$" "\3"
The error is:
CMake Error at D: /CMake/share/cmake-3.1/Modules/FindFLEX.cmake: 137 (string): string sub-command REGEX, mode REPLACE failed to compile regex "^. flex ++ (.exe)?"? (? 0-9) + [^] ) (. *)? $ ". Call Stack (most recent call first):
CMakeLists.txt: 58 (find_package)
The FLEX 2.5 directory has already been configured.
Thank you for your attention.