1
I’m trying to set up a library with Cmake 3.11 and I’m getting a build error from a REGEX string, the project asks for FLEX 2.5 with the function find_package
:
find_package(FLEX 2.5 REQUIRED)
This call uses the module Findflex.cmake, in line 137 of this module has the instruction that generates the error:
string(REGEX REPLACE "^.*${FLEX_EXE_NAME_WE}(${FLEX_EXE_EXT})?\"? (version )?([0-9]+[^ ]*)( .*)?$" "\\3"
The mistake 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)?"? (version )?([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.
the FLEX executable I was using was flex++. exe, when I switched to flex.exe it worked, but it also doesn’t make a difference, I’ve changed the API and already managed to compile, thank you for your attention.
– ProgramandoMil