[CMake] Using regex in find_program
    Rodolfo Schulz de Lima 
    rodolfo at rodsoft.org
       
    Tue Dec 18 10:31:39 EST 2007
    
    
  
There's a functionality that I'm missing in find_program(...). I must 
find an executable that matches a regex expression.
What I'm trying to achieve is find the name of a cross-compiler. It 
would be mingw32-gcc, i585-mingw32msvc-gcc, etc... so I would match 
".*mingw32.*-gcc". Is there any other way to do this?
Is it possible to extend find_program to cope with regexes? In my 
example, I would write:
find_program(PROG REGEX ".*mingw32.*-gcc")
The first matching program name (along with its path) would be returned. 
If there's enough consensus that this should be implemented, I'm willing 
to do this...
Regards,
rod
    
    
More information about the CMake
mailing list