[CMake] Question about regular expressions

Kyle Edwards kyle.edwards at kitware.com
Tue Jun 4 10:43:12 EDT 2019


On Tue, 2019-06-04 at 16:39 +0200, Steven Truppe wrote:
> Hi everyone,
> 
> 
> i had the same question a few days ago but can't rember the command
> (and
> can't find it in the cods):
> 
> I have a regular expression like "WITH_LIB${lib}_EXAMPLE_([A-Za-z]+)"
> and i want the get the content of the found variables in the (), the
> command i used stored them if MATCH_XYZ but i can't exactly rember
> =(.
> 
> 
> best regards!

CMAKE_MATCH_<n>

https://cmake.org/cmake/help/v3.14/variable/CMAKE_MATCH_n.html

Kyle


More information about the CMake mailing list