[CMake] General question about regex

Steven Truppe workbench at gmx.at
Tue Jun 4 12:10:19 EDT 2019


Hello again,


i've the following variable defined:

set(WITH_LIB_GLAD_EXAMPLE_BASIC 1)

And the if the line


foreach(_var VARIABLES)

     if(_var MATCHES "WITH_LIB_GLAD_EXAMPLE_([A-Za-z]+)")

         message(STATUS "Found a match")

endforeach()


I never get the message "Found match", what am i doing wrong here ??



More information about the CMake mailing list